【发布时间】:2015-03-14 18:16:43
【问题描述】:
我在一般目标设置下为我的应用启用了横向:
一切正常 - 该应用程序可用于所有选定方向...
现在我想禁用只有一个视图上的横向模式。
我在特定的视图控制器上尝试了以下操作:
- (BOOL)shouldAutorotate
{
return NO;
}
- (NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskPortrait;
}
可惜没有成功……
编辑:
我的应用的结构是:
UITabBarController
UINavigationController
UITableViewController
UIViewController
【问题讨论】:
-
这个视图是否嵌入在导航控制器中?
-
@JoshGafni 是的,它是一个子视图...
标签: ios ios7 ios8 orientation autorotate