1.UITableView的組頭舌剂、組尾高度顯示異常,設(shè)置tableview section header高度無效【iOS 10以下OK硝训,iOS11失效】
// 設(shè)置tableview section header高度無效典予。
// iOS11默認開啟Self-Sizing,關(guān)閉Self-Sizing即可
self.tableView.estimatedSectionHeaderHeight = 0;
self.tableView.estimatedSectionFooterHeight = 0;
2.UITableView的頂部無法顯示到頂妙同。
// iOS11以后需要替換屬性設(shè)置杈湾,關(guān)閉系統(tǒng)的自動調(diào)整功能
if (@available(iOS 11.0, *)) {
self.tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
} else {
self.automaticallyAdjustsScrollViewInsets = NO;
}