0

在我的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

有任何想法吗?

4

1 回答 1

1

也许你可以试试

-(UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
{
    return UIInterfaceOrientationLandscapeRight;
}
于 2012-11-28T20:48:24.773 回答