当前位置:网站首页>Tableviewcell highly adaptive
Tableviewcell highly adaptive
2022-07-26 09:50:00 【~ light boat ~】
I'm thinking about it recently tableviewCell Height adaptive problem , And then it was git I found a third party on the website that specializes in various highly adaptive systems. If I feel it is easy to use, I will record it :
First send the original link :https://github.com/gsdios/SDAutoLayout.git
If you are interested, you can have a look , Today is just a small function cell Adaptive of , In fact, the original text has been written very clearly I'm just taking notes , For future reference , It's a study note !
SDAutoLayout It's very convenient to use , Auto layout loads the view first , Post write constraints when these are done, let's see how to layout :
to cell Automatic layout takes only two steps :
1. >> Set up cell Highly adaptive :
// cell After the layout is set, calling this method can achieve a high degree of adaptability ( Be careful : If you use highly adaptive, don't use cell The bottom edge of is used as a reference to layout its children view)
[cell setupAutoHeightWithBottomView:_view4 bottomMargin:10];
2. >> Get the automatically calculated cell Height
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
// obtain cell Height
id model = self.modelsArray[indexPath.row];
return [self.tableView cellHeightForIndexPath:indexPath model:model keyPath:@"model" cellClass:[DemoVC9Cell class] contentViewWidth:cellContentViewWith];
// Or use the following method
/* // obtain cell Height return [self cellHeightForIndexPath:indexPath cellContentViewWidth:[UIScreen mainScreen].bounds.size.width]; */
}
Finally, I present my imitation wechat written according to the imitation wechat given by the author , Used to familiarize with SDAutoLayout
link https://github.com/qzWhy/QZWeiXin.git
This article is for record only , Think SDAutolayout To use , The original link has been sent above !
边栏推荐
- antd TreeSelect获取父节点的值
- mfc随手笔记
- Docker configuring MySQL Cluster
- matlab simulink实现模糊pid对中央空调时延温度控制系统控制
- Principle analysis and source code interpretation of service discovery
- 【Mysql数据库】mysql基本操作集锦-看得会的基础(增删改查)
- Table extraction for opencv table recognition (2)
- AR model in MATLAB for short-term traffic flow prediction
- 官方颁发的SSL证书与自签名证书结合实现网站双向认证
- M-ary number STR to n-ary number
猜你喜欢
Server and client dual authentication (2)
Due to fierce competition in the new market, China Mobile was forced to launch a restrictive ultra-low price 5g package
【Mysql数据库】mysql基本操作集锦-看得会的基础(增删改查)
2019 ICPC Asia Yinchuan regional (water problem solution)
A new paradigm of distributed deep learning programming: Global tensor
Gauss elimination solves the inverse of matrix (Gauss)
Fuzzy PID control of motor speed
Fiddler packet capturing tool for mobile packet capturing
spolicy请求案例
CSV data file settings of JMeter configuration components
随机推荐
Basic knowledge of website design
uni-app学习总结
Alibaba cloud technology expert haochendong: cloud observability - problem discovery and positioning practice
copyTo
服务发现原理分析与源码解读
RMQ学习笔记
JS 连等赋值操作
苹果独占鳌头,三星大举复兴,国产手机在高端市场颗粒无收
Write a script that can run in Bash / shell and PowerShell
小白搞一波深拷贝 浅拷贝
系统安装Serv-U后IIS出错提示:HRESULT:0x80070020
Fiddler download and installation
Matlab Simulink realizes fuzzy PID control of time-delay temperature control system of central air conditioning
Double authentication of server and client
[fluorescent character effect]
matlab simulink实现模糊pid对中央空调时延温度控制系统控制
QT随手笔记(六)——更新界面、截图、文件对话框
云原生(三十六) | Kubernetes篇之Harbor入门和安装
B站这个视频我是跪着看完的
【荧光字效果】