ios - 在 iOS9 中强制缩放应用程序

标签 ios xcode ios9 xcode7

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

最佳答案

来自 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 能够适应。您的用户可能对您选择缩放应用不满意,因为您不会在这些较新的设备上利用更大的屏幕尺寸。

关于ios - 在 iOS9 中强制缩放应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32695120/

相关文章:

iphone - 将 native iphone 相机缩放 slider 和 youtube 播放器 Controller 添加到我的应用程序

swift - NSDateFormatter iOS9

objective-c - MFMailComposeViewController mailComposeDelegate 的完成 block 语法是否可行?

objective-c - -[__ NSArrayM objectForKey:]:无法识别的选择器发送到实例Objective c中的错误

ios - 重用 UITextField 委托(delegate)方法的实现

ios - Xcode 7 垂直 ScrollView 问题

ios - Xcode 10 (10A255) 错误 : <unknown>:0: error: duplicate input file

ios - Alamofire自定义参数

ios - 为 UItableview swift 中的每一行添加新的(不可重复使用的)单元格

ios9 - 共享扩展不适用于 iOS 9