1
我正在研究故事板应用程序,旋转在iOS6设备上工作,但是当我在iOS5设备上运行时,它不会旋转。我有嵌入在导航控制器视图控制器(因此导航控制器是该窗口的根视图控制器)和I具有以下方法覆盖:旋转在iOS5中不起作用Storyboard
- (BOOL)shouldAutorotate
{
return YES;
}
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
{
return UIInterfaceOrientationLandscapeRight;
}
- (NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskLandscapeRight|UIInterfaceOrientationMaskLandscapeLeft|UIInterfaceOrientationMaskPortrait;
}
-(BOOL)shouldAutoRotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
if ((interfaceOrientation == UIInterfaceOrientationLandscapeLeft) || (interfaceOrientation == UIInterfaceOrientationLandscapeRight) || (interfaceOrientation ==UIInterfaceOrientationPortrait)){
return YES;
} else {
return NO;
}
}
我也有3个取向允许在我的plist,我的部署目标是基础SDK iOS6的iOS5,并且自动布局被关闭,并且想法为什么这不起作用?
谢谢!
对不起,我忘了提,我把断点内的所有在我的导航控制器的方法对iOS6的运行时和应用程序并打破这些方法 –
哈哈,现在它的工作原理!很好的感谢! –