备忘:记得检查以下代码
// 下面这个很重要。
edgesForExtendedLayout =[] // 默认时all(all的话是navigation的top开始布局。[] 为空。 空的话是从导航栏下开始布局)
tableView是否需要自动调整Inset
if #available(iOS 11.0, *) {
extendedLayoutIncludesOpaqueBars = true;
tableView.contentInsetAdjustmentBehavior = .never
} else {
automaticallyAdjustsScrollViewInsets = false;
}
网友评论