【发布时间】:2012-08-29 00:51:26
【问题描述】:
我正在使用 iOS 6.0 测试版,但我的轮换不再起作用。
在哪里可以设置 UINavigationControllers supportedOrientations?
据此http://news.yahoo.com/apple-ios-6-beta-3-changes-182849903.html UINavigation Controller 不会咨询他们的孩子来确定他们是否应该自动旋转。
我不再使用 shouldAutorotateToInterfaceOrientation:,因为它已被弃用。 相反,我使用的是supportedInterfaceOrientations:和shouldAutoRotate:并且它们工作正常,直到我将ViewController放入NavigationController(作为孩子)。 从那时起,在 ViewController 中指定的方向不再起作用。 它似乎正在使用导航控制器设置的方向(UIInterfaceOrientationMaskAllButUpsideDown)
如何设置 NavigationController 的 InterfaceOrientations 以便将我的 ViewControllers 锁定为 Portrait-Orientation?
我必须继承 UINavigationController 并在那里设置 InterfaceOrientations 吗?在 iOS 6.0 中继承 UINavigationController 不是不好的做法吗?
感谢您的帮助!
干杯!
【问题讨论】:
标签: objective-c uinavigationcontroller ios6