解決方法: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