iOS11&IPhoneX适配(2)
2018-12-03 本文已影响64人
MJBaby
1、iOS11 scrollview 显示时会有滚动效果
消除的方法:
if ([self.tableView respondsToSelector:@selector(setContentInsetAdjustmentBehavior:)]) {
if (@available(iOS 11.0, *)) {
self.tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
} else {
// Fallback on earlier versions
}
}