supportedInterfaceOrientationsForWindow在iOS 9 AppDelegate中未调用

前端之家收集整理的这篇文章主要介绍了supportedInterfaceOrientationsForWindow在iOS 9 AppDelegate中未调用前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在使用iOS 9 GM测试我们的应用程序,我看不到在AppDelegate中调用的SupportedInterfaceOrientationsForWindow.

我期望在应用程序旋转时调用此委托函数

- (UIInterfaceOrientationMask) application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window

这在iOS 7/8中运行正常.有其他人看到这个或有什么想法可能会发生什么?

解决方法

您需要在“常规目标”设置中选中“需要全屏”框 – 然后在此处工作.

我想的背景是,苹果希望我们提供所有方向,加上这些都与iOS 9分屏,幻灯片放映等.

见他们的文档here

寻找“表征你的应用程序和范围你的工作”:

Adopt Slide Over and Split View unless you have a specific reason not
to.
From a customer’s perspective,an iOS 9 app that doesn’t adopt
Slide Over and Split View feels out of place.

Consider opting out only if your app falls into one of these narrow
categories:

Camera-centric apps,where using the entire screen for preview and capturing a moment quickly is your primary feature Full-device apps,such as games that use iPad sensors as part of their core gameplay

原文链接:https://www.f2er.com/iOS/329377.html

猜你在找的iOS相关文章