强制放大应用 iOS9

Force to zoom app in iOS9

我有一个应用程序 iPhone 6 我希望它按比例缩放。 基本上我想从设置中模仿应用缩放。目前,当我 运行 使用设置中的缩放模式的应用程序时,一切正常,但是当我 运行 它没有设置中的缩放模式时,显示的视图较小。我该如何解决?

来自 Apple 的 What's New in iOS 文档:

To let the system know that your app supports the iPhone 6 screen sizes, include a storyboard launch screen file in your app’s bundle. At runtime, the system looks for a storyboard launch screen file. If such an file is present, the system assumes that your app supports the iPhone 6 and 6 Plus explicitly and runs it in fullscreen mode. If such an image is not present, the system reports a smaller screen size (either 320 by 480 points or 320 by 568 points) so that your app’s screen-based calculations continue to be correct. The contents are then scaled to fit the larger screen.

如果您不提供启动屏幕文件(也不提供 iPhone 6 和 6 Plus 的启动屏幕图像),您的应用将被缩放而不是 运行 在全屏模式下。

Apple 确实建议使用大小 类 和自动布局,这样您的应用程序的 UI 适应。您的用户可能对您选择缩放应用程序不满意,因为您不会在这些较新的设备上利用更大的屏幕尺寸。

通过为我的一张启动图像添加名称 Default-568h@2x.png 解决,现在我的应用是 scaled.I 不得不说我没有 Storyboard 启动屏幕文件放。感谢@PetahChristian 的信箱提示,我能够解决这个问题。

As for the black borders, you must provide some launch images, or iOS will think your app doesn't even support the 4" iPhones and letterbox it