Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我最近升级到 xcode 9 并在模拟器 iPhone X 上运行我的项目,状态栏下的视图被扭曲了。在其他手机上一切正常。
iPhone X 中的扭曲视图
其他手机中的不失真视图
如果你不使用安全区域,你可以用 0 常量将它固定到顶部布局指南:
或者您可以在视图控制器的文件检查器中启用安全区域,它可以向后部署回 iOS 9,并再次使用 0 常量固定顶部。
set view's Y as 44. Status bar height is 44. If navigation bar is there, make it 145. I hope it will work