在iOS11 中automaticallyAdjustsScrollViewInsets属性被废弃
可以做一下系统的判断
if (@available(iOS 11.0, *)) {
table.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
}else {
self.automaticallyAdjustsScrollViewInsets = NO;
}
希望对你有所帮助