原因:
UITableview有个估算行高功能,如果没有设置tableView.estimatedRowHeight = 0,默认开启,默认高度是44,也就是如果你实际行高和44偏差很大的话,每次reloadData就会先根据估算行高进行刷新然后再走heightForRow去获取真正高度,就会视觉上就会产生跳一下的感觉,tableView.estimatedRowHeight = 0设置为0关闭这个功能就行了 
 
解决办法一:刷新单个cell
 
解决办法二:
self.tableView.estimatedRowHeight = 0
self.tableView.estimatedSectionHeaderHeight = 0
self.tableView.estimatedSectionFooterHeight = 0

 

http://www.cocoachina.com/bbs/read.php?tid-1727023-page-1.html 
 
posted on 2018-10-20 00:03  怡情_老二  阅读(212)  评论(0编辑  收藏  举报