且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

动态调整UITextView和UITableViewCell的大小以适应内容

更新时间:2023-02-09 19:12:07

***在heightForRowAtIndexPath中计算单元格的高度,如here 。如果您对空行有问题,请在其上添加一个临时空白。





一篇有趣的文章也是 iOS 8中的自动调整表格单元格
Calculations for the heigth of the cell is best done in heightForRowAtIndexPath like here. If you have problem with an empty line an add a temporary blank on it.


An interesting article is also Auto Sizing Table Cells in iOS 8.

>