在viewController中添加scrollView并鋪滿全屏,隱藏導(dǎo)航條析校,設(shè)置scrollView上下左右間距為0,此種情況上部會留出狀態(tài)欄高度,iPhone X上下部會留出34牙咏,都無法鋪滿全屏
解決如下:
if (@available(iOS 11.0, *)) {
self.scrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
}else{
self.automaticallyAdjustsScrollViewInsets = NO;
}