【发布时间】:2013-09-04 22:52:37
【问题描述】:
我已经为自动旋转实现了一个视图控制器。所以这个视图控制器,我称之为RotatableViewController,实现了这些方法:
- (UIInterfaceOrientation) preferredInterfaceOrientationForPresentation
{
return UIInterfaceOrientationPortrait;
}
- (NSUInteger) supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskAll;
}
- (BOOL) shouldAutorotate {
return YES;
}
它应该自动旋转到所有方向,我还检查了目标中支持的界面方向:
但令人难以置信的是,它不会在纵向倒置方向上自动旋转:
可能是什么问题?
PS 在 iOS 6.1 中,视图控制器通过情节提要进行实例化。
【问题讨论】:
标签: iphone ios objective-c autorotate