支持 iOS 6 和 iOS 5 自动旋转 [英] Supporting both iOS 6 and iOS 5 autorotation

查看:13
本文介绍了支持 iOS 6 和 iOS 5 自动旋转的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以确认要同时支持 iOS 6 和 iOS 5,添加新的 iOS 6 自动旋转方法没有意义,因为 Apple 文档建议如果您还实施 iOS 5 方法,这些方法将被完全忽略?

Can anyone confirm that to support both iOS 6 and iOS 5 there is no point to adding the new iOS 6 autorotation methods, since the Apple docs suggest that these methods are completely ignored if you are also implementing the iOS 5 methods?

特别是,我谈论的方法 - (NSUInteger)supportedInterfaceOrientations- (BOOL) shouldAutorotate -- 如果您还实现 - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation

In particular, I talking about the methods - (NSUInteger)supportedInterfaceOrientations and - (BOOL) shouldAutorotate -- that these are ignored and synthesized by the compiler if you also implement the - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation

推荐答案

如果您在新的 sdk 中打包您的应用程序,您需要添加新的自动旋转回调.但是,只有在 iOS 6 设备上运行此类应用程序时,才会收到这些回调.对于在较早 iOS 版本上运行的设备,将收到较早的回调.如果您不实现新的回调,则默认行为是您的应用在 iPad 上的所有方向以及 iPhone 上除 UpsideDown 方向之外的所有方向上运行.

You need to add new callback for autorotation if you are packaging your app in the new sdk. However, these callbacks will be received only when such an app is run on iOS 6 devices. For devices running on earlier iOS versions, earlier callbacks would be received. If you dont implement the new callbacks, the default behavior is that your app runs on all orientation on iPad and all except UpsideDown orientation on iPhone.

这篇关于支持 iOS 6 和 iOS 5 自动旋转的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆