Swift -[UISectionRowData refresh
2020-08-29 本文已影响0人
HappyJiuOk
出现系统:iOS10.x.x
出现原因:
1.代码实现了
UITableView.appearance().estimatedRowHeight = 0
UITableView.appearance().estimatedSectionFooterHeight = 0
UITableView.appearance().estimatedSectionFooterHeight = 0
却未包含在if #available(iOS 11.0, *) {}
里
2.同时storyboard或者xib 上的UITableView 勾选了estimatedRowHeight 这个选项

解决办法:
if #available(iOS 11.0, *) {
UITableView.appearance().estimatedRowHeight = 0
UITableView.appearance().estimatedSectionFooterHeight = 0
UITableView.appearance().estimatedSectionFooterHeight = 0
}