if (@available(iOS 11.0, *)) {
_vCollectionView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
}else {
self.automaticallyAdjustsScrollViewInsets = NO;
}
转:https://www.cnblogs.com/xiaodeng90/p/9361166.html