[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.left.right.bottom.mas_offset(0);
}];
當iOS11的時候
//適配X
if (@available(iOS 11.0, *)) {
self.tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentAutomatic;
} else {
self.automaticallyAdjustsScrollViewInsets = NO;
}
這里特別要注意的是茎活,使用UIScrollViewContentInsetAdjustmentAutomatic
,而不是`UIScrollViewContentInsetAdjustmentNever寻行,否則的話底部會出現(xiàn)遮擋的問題。