我正在为项目使用Xcode 9,底部有一个空白,这是屏幕截图:
我还使用情节提要来设计4英寸(iphone 5s/SE)的布局.
如何避免空白?
解决方案您的bottom constraints应该来自view,而不是bottom layout guide或safe area(特定于xcode 9),并且您的距离应该为零. /p>
默认情况下,它是用layout guides固定的,所以请给它加上view!
请参阅下面的屏幕截图,以更好地理解
要打开此对话框,请单击包含0的字段的下拉图标!
您也可以为top constraint做同样的事情!
更新:
第二重要的事情,
您应该使用情节提要进行启动或启动屏幕.如果您使用的是启动图像,则将其替换为新的xcode 9启动图像,并且它具有iphone x图像的选项.
那么您将再也找不到空白!
请参阅下面的屏幕截图.
I'm using Xcode 9 for my project and I'm getting a white space at the bottom, here is the screenshot:
Also I'm using storyboard to design with 4 inches (iphone 5s/SE) as layout.
How to avoid the white space?
解决方案Your bottom constraints should be from view not from the bottom layout guide or safe area(xcode 9 specific) and your distance should be zero.
Default it was pinned with layout guides, so give it with view !
Refer below screenshot for better understanding,
to open this dialogue, click drop down icon of field contains 0!
You can do same for top constraint also!
Update :
Second main important thing,
you should use storyboard for your launch or splashscreen. If you are using launch image then replace it by new launch image of xcode 9 and it have option for the image of iphone x.
Then you will not found white space any more!
Refer below screenshot.
更多推荐
在iPhone X屏幕底部获得空白(Xcode 9)
发布评论