estimatedHeightForRowAtIndexPath

2018-01-02  本文已影响39人  i诺离
- (CGFloat)tableView:(UITableView *)tableView estimatedHeightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    return 200;
}

结论

设置该方法estimatedHeightForRowAtIndexPath,系统只会计算当先屏幕显示的cell的高度,其他的都是调用estimatedHeightForRowAtIndexPath返回的值来计算

所以需要注意是否设置该方法后,tableview的生命周期

欢迎指正,谢谢~

上一篇 下一篇

猜你喜欢

热点阅读