App not occupying complete screen in iphone X simulator in Xcode 9 [duplicate]

瘦欲@ 提交于 2020-01-24 16:58:25

问题


With the release of Xcode 9, we are able to test UI of our app on iPhone X simulator. When I ran my app on iPhone X simulator, it does not occupy complete screen. There is space left on the top and bottom of the Apps View.

Can anyone please tell how to remove that space, I am already using auto layouts in my app. I am attaching the screenshot of my app.


回答1:


You need to add Splash screen/Launch Image for iPhone X in xcode 9. iPhone X launch image's dimensions are 1125 x 2436




回答2:


It is because of the new feature Safe Area of Xcode 9 to handle user interface design for iPhone-X.

It is required to handle user interface design for iPhone-X. Here is basic guideline for How to design user interface for iPhone-X using Safe Area Layout

Here is the developer guidelines of apple IPhone-X Development

You can solve this by 2 ways

1. Uncheck use safe area support

2. If you are using Autolayout adjust your toplayout constraint value as that achive FullScreen



来源:https://stackoverflow.com/questions/46849251/app-not-occupying-complete-screen-in-iphone-x-simulator-in-xcode-9

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!