在iPhone X屏幕底部获得空白(Xcode 9) [英] Getting a white space at bottom of iPhone X screen (Xcode 9)

查看:223
本文介绍了在iPhone X屏幕底部获得空白(Xcode 9)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为项目使用Xcode 9,底部有一个空白,这是屏幕截图:

我还使用情节提要来设计4英寸(iphone 5s/SE)的布局.

如何避免空白?

解决方案

您的bottom constraints应该来自view,而不是bottom layout guidesafe 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)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆