作为Android开发ios初学者,哈哈哈,最近遇到ios状态栏的适配问题,部分ios设备坐标系起点在状态栏左下角,部分在状态栏坐上角,作为Android开发人员,一脸懵逼,还有这操作。后网上找到问题答案,记录一下。
https://blog.youkuaiyun.com/globalYK/article/details/50496916
https://blog.youkuaiyun.com/viiimaus/article/details/78204200
主要在ViewController中添加:
extendedLayoutIncludesOpaqueBars = true;
edgesForExtendedLayout = .top;
automaticallyAdjustsScrollViewInsets = false;
本文分享了iOS状态栏适配问题的解决方案,对于部分设备坐标系起点在状态栏左下角,部分在坐上角的情况,介绍了在ViewController中设置extendedLayoutIncludesOpaqueBars、edgesForExtendedLayout和automaticallyAdjustsScrollViewInsets参数的具体方法。
1万+

被折叠的 条评论
为什么被折叠?



