在iPhone X屏幕底部获得空白(Xcode 9)

编程入门 行业动态 更新时间:2024-10-24 15:17:11
本文介绍了在iPhone X屏幕底部获得空白(Xcode 9)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在为项目使用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)

本文发布于:2023-07-19 08:55:39,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1154919.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:空白   屏幕   iPhone   Xcode

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!