【发布时间】:2012-11-29 21:56:51
【问题描述】:
如何在 ios6 中在 iPad 中旋转单个 ViewController。我在
appdelegate.m
- (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window
{
return UIInterfaceOrientationMaskPortrait;
}
它使所有viewcontroller 成为纵向,我想要一个viewcontroller 仅在横向模式之间。
在graphViewController.m中
- (BOOL)shouldAutorotate
{
return NO;
}
- (NSUInteger)supportedInterfaceOrientations {
return UIInterfaceOrientationMaskLandscape;
}
但我无法得到正确的结果,请尽快回复。谢谢。
【问题讨论】:
-
我认为您应该在 appDelegate 中同时支持方向并为每个 ViewController 设置supportedInterfaceOrientations。
-
你在导航控制器中吗?