作为Android开发ios初学者,哈哈哈,最近遇到ios状态栏的适配问题,部分ios设备坐标系起点在状态栏左下角,部分在状态栏坐上角,作为Android开发人员,一脸懵逼,还有这操作。后网上找到问题答案,记录一下。
https://blog.csdn.net/globalYK/article/details/50496916
https://blog.csdn.net/viiimaus/article/details/78204200
主要在ViewController中添加:
extendedLayoutIncludesOpaqueBars = true;
edgesForExtendedLayout = .top;
automaticallyAdjustsScrollViewInsets = false;