iOS界面整体上移

一般是两个原因:

1、UIScrollView的偏移

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

2、导航栏的毛玻璃效果

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

 

posted @ 2022-03-11 10:00  码出境界  阅读(441)  评论(0)    收藏  举报