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