解决iOS UITableView上拉加载更多刷新跳动,自动计算行高 UITableViewAutomaticDimension

1、正常情况下我们只要设置这三个刷新为零就可以了

tableView.estimatedRowHeight = 0;
tableView.estimatedSectionFooterHeight = 0;
tableView.estimatedSectionHeaderHeight = 0;

2、如果和我一样使用的是自动计算行高 ,那么estimatedRowHeight就必须不为0。把预估行高也设置为自动计算 UITableViewAutomaticDimension 就可以了,完美!

tableView.rowHeight = UITableViewAutomaticDimension;
tableView.estimatedRowHeight = UITableViewAutomaticDimension;
tableView.estimatedSectionFooterHeight = 0;
tableView.estimatedSectionHeaderHeight = 0;
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容