iOS 9 Xcode 7 - 应用程序在顶部和底部出现黑条 [英] iOS 9 Xcode 7 - Application appears with black bars on top and bottom

查看:28
本文介绍了iOS 9 Xcode 7 - 应用程序在顶部和底部出现黑条的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 iPhone 6 iOS9 上安装了该应用程序,结果如下.注意顶部和底部的黑条.它在 iOS8 上运行良好.我该如何解决?

Installed the app on iPhone 6 iOS9 and here is what happened. Notice black bars on top and bottom. It works just fine on iOS8. How I can fix it?

我试过用 Xcode 6.4 & 构建7. 相同的结果.

I've tried building with Xcode 6.4 & 7. Same result.

(iPhone 5 用于运行 iPhone 4 这样的应用程序)

(iPhone 5 used to run iPhone 4 apps like this)

推荐答案

您是否从 Xcode 的早期版本迁移了您的应用程序?如果是这样,那么 Xcode 现在正在对您的屏幕尺寸进行假设,您需要一种在运行时指示实际屏幕尺寸的方法.

Did you migrate your app from an earlier version of Xcode? If so then Xcode is now making an assumption about your screen size and you need a way of indicating the actual screen size at run time.

有两种方式:

a) 如果您使用启动屏幕.

您缺少 LaunchScreen.storyboard 文件.从 New File... 对话框创建一个 Launch Screen 对象

You are missing a LaunchScreen.storyboard file. Create a Launch Screen object from the New File... dialog

b) 如果您不使用启动屏幕.

转到 Target 的设置并选择常规,然后选择应用图标和启动图像.现在设置启动屏幕文件"到你的main.storyboard"(或其他故事板,如果合适)

Go to your Target's settings and choose General, then App Icons and Launch Images. Now set "Launch Screen File" to your "main.storyboard" (or another storyboard if appropriate)

这篇关于iOS 9 Xcode 7 - 应用程序在顶部和底部出现黑条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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