问题
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