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 这个选项

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

猜你喜欢

热点阅读