Xcode 中的“需要全屏”选项对仅限 iPhone 的应用程序有何影响?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/34608826/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What is the impact of the "Requires full screen" option in Xcode for an iPhone-only app?
提问by goodbyeera
For an iPad-only app or a universal app, the "Requires full screen"
option tells Xcode/iOS whether the app supports iPad multitasking feature introduced in iOS 9. But the "Requires full screen"
option is also present if it's an iPhone-only app. In this case, what is the impact of this option?
对于仅限 iPad 的应用程序或通用应用程序,该"Requires full screen"
选项会告诉 Xcode/iOS 该应用程序是否支持 iOS 9 中引入的 iPad 多任务处理功能。但"Requires full screen"
如果它是仅限 iPhone 的应用程序,则该选项也存在。在这种情况下,这个选项的影响是什么?
回答by KingofBliss
There is no impact at all. Apple engineers thinks that its not required to hide, or may be Plus phones will get landscape slide over in later iOS versions :)
完全没有影响。苹果工程师认为它不需要隐藏,或者可能是 Plus 手机在以后的 iOS 版本中会横向滑动:)
From the documentation:
从文档:
To opt out of being eligible to participate in Slide Over and Split View, add the UIRequiresFullScreen
key to your Xcode project's Info.plist file and apply the Boolean value YES.
要选择不参加 Slide Over 和 Split View,请将UIRequiresFullScreen
密钥添加到 Xcode 项目的 Info.plist 文件并应用布尔值 YES。
回答by Bram
Normally, you would need to support both portrait and landscape orientation in your app.If your app is landscape only or portrait only, then the app validation fails with:
通常,您的应用需要同时支持纵向和横向。如果您的应用仅支持横向或纵向,则应用验证将失败:
warning: All interface orientations must be supported unless the app requires full screen.
警告:除非应用程序需要全屏,否则必须支持所有界面方向。
And as KingofBliss noted, setting this to YES will also stop your app from running in a split view.
正如 KingofBliss 所指出的,将此设置为 YES 也会阻止您的应用程序在拆分视图中运行。
It is a useful setting for games that run full screen in landscape only.
对于仅在横向模式下全屏运行的游戏来说,这是一个有用的设置。