iOS TableView reloadData刷新列表cell乱跳、tableview闪动的问题。

解决方法:spa

在iOS 11Self-Sizing自动打开后,contentSize和contentOffset均可能发生改变。能够经过如下方式禁用io

 self.estimatedRowHeight = 0;
self.estimatedSectionHeaderHeight = 0;table

self.estimatedSectionFooterHeight = 0;class

 

在iOS 10 如下 经过如下协议方法设置精准高度就能够了方法

- (CGFloat)tableView:(UITableView *)tableView estimatedHeightForRowAtIndexPath:(NSIndexPath *)indexPath NS_AVAILABLE_IOS(7_0);im

- (CGFloat)tableView:(UITableView *)tableView estimatedHeightForHeaderInSection:(NSInteger)section NS_AVAILABLE_IOS(7_0);协议

- (CGFloat)tableView:(UITableView *)tableView estimatedHeightForFooterInSection:(NSInteger)section NS_AVAILABLE_IOS(7_0);tab

相关文章
相关标签/搜索