iOS界面整体上移


一般是两个原因:

1、UIScrollView的偏移

if (@available(iOS 11, *)) {
    UIScrollView.appearance.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
}

2、导航栏的毛玻璃效果

controller.navigationBar.translucent = NO; //去除毛玻璃效果