ios 6 supportedInterfaceOrientations

时间:2012-11-28 18:54:00

标签: xcode uiview ios6 uiinterfaceorientation

在我的apilicacion中使用以下方法旋转:

- (NSUInteger) {supportedInterfaceOrientations
    return UIInterfaceOrientationMaskLandscapeLeft | UIInterfaceOrientationMaskLandscapeRight;
}

但是加载下一个视图时

 View2 *Cambio =[[View2 alloc]initWithNibName:Nil bundle:Nil];
 Cambio.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
 [self presentViewController:Cambio animated:NO completion:^{/* done */}];

但这会自动旋转到UIInterfaceOrientationMaskLandscapeRight to UIInterfaceOrientationMaskLandscapeLeft

有什么想法吗?

1 个答案:

答案 0 :(得分:1)

也许你可以试试

-(UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
{
    return UIInterfaceOrientationLandscapeRight;
}