【发布时间】:2014-05-18 22:55:35
【问题描述】:
目前我正在使用带有情节提要的自动布局来动态调整自定义UITableViewCell 的大小。除了滚动时出现内存泄漏之外,一切正常。
我知道问题出在调用
[self.tableView dequeueReusableCellWithIdentifier:CellIdentifier];
从内部
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
我的问题是,创建参考单元格的最佳方法是什么?如何在没有dequeueReusableCellWithIdentifier 的情况下从情节提要加载单元格?
可以从viewDidLoad 调用dequeueReusableCellWithIdentifier 并创建一个引用单元格作为属性吗?
我需要参考单元来调整大小。
感谢您的帮助。
【问题讨论】:
标签: ios uitableview autolayout heightforrowatindexpath