iOS iPhone 6 上的视图控制器大小为 4 英寸

iOS View Controller size is 4 inch on iPhone 6

我有面向 iPhone 的应用程序,UI 使用故事板创建,当我 运行 它在 4.7 或 5.5 英寸设备上显示为 4 英寸屏幕,黑色空白 space 在 window 的顶部和底部。 该项目是在 Xcode 6 上创建的,我在使用 Xcode 7 编译它时遇到了问题,但我不确定它是否相关。

在 Xcode 7 上,您必须添加所需分辨率(iphone6、iphone5...)的启动屏幕(在 "images.xcassets" 上),或者您可以添加自动适用于所有分辨率的启动画面(YourProjectName/General/App 图标和启动图像)。

希望对您有所帮助。

您还没有在适当的位置添加具有适当分辨率的启动图像。因此,您的应用仅考虑 iphone5 不高于 so.Place 正确启动图像 。它会 help.Thanks

这里是Apple's answers

If you don't use launch images, but you do have a Launch Screen (nib or storyboard) then we synthesize your launch screen at install time.

If you don't have any launch images, and you don't have a launch nib or storyboard, then you are declaring that you don't support any screen sizes aside from 320x480

A brand new project should not demonstrate any of these issues

With the iPad Pro you will need a Launch Screen to support the new screen size (and you need Launch Screens to support multitasking on iPad in general).