1、自動調節關閉
if(@available(iOS11.0, *)) {
self.tableView.contentInsetAdjustmentBehavior=UIScrollViewContentInsetAdjustmentNever;
}else{
self.automaticallyAdjustsScrollViewInsets=NO;
}
2、Header和Footer界面調整。
Self-Sizing在iOS11下是默認開啟的,Headers, footers, and cells都默認開啟Self-Sizing,所有estimated 高度默認值從iOS11之前的 0 改變為UITableViewAutomaticDimension:
如果有動畫監聽,group模式下多于1屏顯示,都會引起錯位
關閉Self-Sizing:
self.tableView.estimatedRowHeight=0;
self.tableView.estimatedSectionHeaderHeight=0;
self.tableView.estimatedSectionFooterHeight=0;