当前位置:网站首页>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 !
边栏推荐
- 编写一个在bash / shell 和 PowerShell中均可运行的脚本
- Cloud native (36) | introduction and installation of harbor in kubernetes
- 小白搞一波深拷贝 浅拷贝
- Audio and video knowledge
- WARNING: [pool www] server reached pm. max_ children setting (5), consider raising it
- 莫队学习笔记(一)
- Write a script that can run in Bash / shell and PowerShell
- QT随手笔记(六)——更新界面、截图、文件对话框
- 云原生(三十六) | Kubernetes篇之Harbor入门和安装
- Sqoop [put it into practice 02] sqoop latest version full database import + data filtering + field type support description and example code (query parameter and field type forced conversion)
猜你喜欢

解决npm -v突然失效 无反应

2022年中科磐云——服务器内部信息获取 解析flag

Registration module use case writing

Search module use case writing
![Sqoop [environment setup 01] CentOS Linux release 7.5 installation configuration sqoop-1.4.7 resolve warnings and verify (attach sqoop 1 + sqoop 2 Latest installation package +mysql driver package res](/img/8e/265af6b20f79b21c3eadcd70cfbdf7.png)
Sqoop [environment setup 01] CentOS Linux release 7.5 installation configuration sqoop-1.4.7 resolve warnings and verify (attach sqoop 1 + sqoop 2 Latest installation package +mysql driver package res

Apple dominates, Samsung revives, and domestic mobile phones fail in the high-end market

SSG framework Gatsby accesses the database and displays it on the page

Logical architecture of MySQL

R language ggplot2 visualization: align the legend title to the middle of the legend box in ggplot2 (default left alignment, align legend title to middle of legend)

Login module use case writing
随机推荐
Phpexcel export Emoji symbol error
Registration module use case writing
QT handy notes (II) edit control and float, qstring conversion
EOJ 2020 January race E-number transformation
青少年软件编程等级考试标准解读_二级
Principle analysis and source code interpretation of service discovery
R language ggplot2 visualization: align the legend title to the middle of the legend box in ggplot2 (default left alignment, align legend title to middle of legend)
Qt随手笔记(二)Edit控件及float,QString转化、
Audio and video knowledge
系统安装Serv-U后IIS出错提示:HRESULT:0x80070020
Node 内存溢出及V8垃圾回收机制
Sqoop [put it into practice 02] sqoop latest version full database import + data filtering + field type support description and example code (query parameter and field type forced conversion)
Why does new public chain Aptos meet market expectations?
CSV data file settings of JMeter configuration components
Modern medicine in the era of "Internet +"
高斯消元求解矩阵的逆(gauss)
一种分布式深度学习编程新范式:Global Tensor
服务发现原理分析与源码解读
(一)面扫描仪与机械臂的手眼标定(眼在手上)
A new paradigm of distributed deep learning programming: Global tensor