1
我开发了两种方向的ipa应用程序,但不调用- (BOOL)shouldAutorotate {return YES;}
。iPad应用程序方向未在iOS 6.1中更改
我开发了两种方向的ipa应用程序,但不调用- (BOOL)shouldAutorotate {return YES;}
。iPad应用程序方向未在iOS 6.1中更改
使用UINavigationController
可能会扰乱viewControllers
的方向,为了使其工作,您可以实现自定义的NavigationController并在您的应用程序中使用它。你还应该确保你没有在你的窗口中添加子视图,如果你使用subView
到你的UIWindow
那么你会在控制台上得到警告。 Application windows are expected to have a root view controller at the end of application launch
,如果您使用subview
,则不会调用您的定位方法。正确的做法是
self.window.rootViewController = yourRootController;
Follow my answer for implementing UINavigationController它会解决你的问题。
你使用的是navigationController吗? – nsgulliver 2013-04-08 13:14:13
是的。我正在使用UINavigationController – 2013-04-08 13:16:19
您是否已转至应用目标,摘要选项卡并确保选择了所有支持的方向? – 2013-04-08 13:28:40