【发布时间】:2012-09-15 02:22:48
【问题描述】:
我有一个只能在 Portrait Mode 中使用的应用程序,但是有一个可以显示视频的单视图,所以我希望该视图也可以在 landscape mode 中使用,但是在 iOS 6 中我无法弄清楚我是如何做到的可以做到,现在我有了这个:
在 AppDelegate.m 我有:
self.window.rootViewController = myTabBar;
然后在项目摘要中:
我发现在 iOS 6 中要检测视图旋转我必须这样做:
- (NSUInteger)supportedInterfaceOrientations {
return UIInterfaceOrientationMaskAll;
}
// Tell the system It should autorotate
- (BOOL) shouldAutorotate {
return YES;
}
所以我只在我的UIViewController 中插入上面的代码,我也想在横向中使用它,但是不工作,有人知道我该怎么做吗?我只想在显示视频时自动旋转。
【问题讨论】:
标签: iphone uiviewcontroller ios6 landscape-portrait