获取iphone x屏幕底部的空白区域(xcode 9) [英] Getting a white space at bottom of iphone x screen(xcode 9)

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

问题描述

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

I'm using Xcode 9 for my project and I'm getting a white space at the bottom, here is the screenshot:

此外我正在使用故事板设计4英寸(iphone 5s / SE)作为布局。

Also I'm using storyboard to design with 4 inches (iphone 5s/SE) as layout.

如何避免空格?

推荐答案

你的底部约束应该来自 view 而不是底部布局指南安全区(特定于xcode 9),你的距离应为零。

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,

打开此对话框,单击下拉菜单字段图标包含 0

to open this dialogue, click drop down icon of field contains 0!

您可以为顶部约束也!

更新:

第二个重要的事情,

您应该使用storyboard进行启动或启动画面。如果您正在使用启动图像,则将其替换为 xcode 9 的新启动图像,并且它具有iphone x图像的选项。

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!

参考下面的截图。

< a href =https://i.stack.imgur.com/j6uu0.png =noreferrer>

这篇关于获取iphone x屏幕底部的空白区域(xcode 9)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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