在 iPhone X 模拟器的顶部和底部看到黑条 [英] Seeing black bars at the top and bottom of the iPhone X Simulator

查看:42
本文介绍了在 iPhone X 模拟器的顶部和底部看到黑条的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 iPhone X Simulator (GM Seed) 中运行我的应用程序我注意到两个奇怪的效果:

Running my App in the iPhone X Simulator (GM Seed) I am noticing two strange effects:

  • 该应用程序未使用全屏空间(顶部和底部区域为黑色)
  • 标题栏下方有一个奇怪的白色条

有谁知道这里发生了什么以及如何解决这个问题?我在 Interface Builder 中找不到任何新设置.

Does anybody know what is happening here and how to resolve this? I can't find any new settings in Interface Builder.

推荐答案

当使用启动图像(而不是更简单的启动屏幕文件)时,您需要为您希望支持的每种设备尺寸提供适当大小的启动图像.添加额外的启动图片后,您的应用应该会利用新的屏幕尺寸.

When using launch images (instead of the much easier Launch screen file), you need to provide the properly sized launch image for each device size you wish to support. Once you add the additional launch image, your app should take advantage of the new screen size.

新的 iPhone X 需要一张大小为 1125px × 2436px 的启动图像,即 375pt × 812pt 的 3x 图像.

The new iPhone X requires a launch image sized at 1125px × 2436px which is a 3x image for 375pt × 812pt.

当然,如果您改用启动屏幕文件而不是单个启动图像,您的应用将自动适应所有设备尺寸,无需任何额外工作.

Of course if you switch over to using a Launch screen file instead of individual launch images, your app will automatically adapt to all device sizes without any additional work.

这篇关于在 iPhone X 模拟器的顶部和底部看到黑条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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