Ios 从纵向视图控制器显示模式横向视图控制器

Ios 从纵向视图控制器显示模式横向视图控制器,ios,ios4,uiviewcontroller,modalviewcontroller,Ios,Ios4,Uiviewcontroller,Modalviewcontroller,我有一个只提供肖像的VC,它提供了一个只提供风景的VC。我正努力想知道我怎样才能让它发挥作用。我很幸运地调用了一个动画,在它呈现后旋转模态VC,但这看起来有点不可靠 我坚持使用iOS 4.3,所以没有故事板 我想要的是 [landscapeVC setOrentation:UIDeviceOrentaionLanscape]; [portraitVC presentModalViewController:landscapeVC Animated:YES]; 感谢您的帮助在VC的viewDidL

我有一个只提供肖像的VC,它提供了一个只提供风景的VC。我正努力想知道我怎样才能让它发挥作用。我很幸运地调用了一个动画,在它呈现后旋转模态VC,但这看起来有点不可靠

我坚持使用iOS 4.3,所以没有故事板

我想要的是

[landscapeVC setOrentation:UIDeviceOrentaionLanscape];
[portraitVC presentModalViewController:landscapeVC Animated:YES];

感谢您的帮助

在VC的viewDidLoad方法和shouldautorotate方法中使用此选项:

 [[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationLandscapeRight animated:NO];
 [[self view] setBounds:CGRectMake(0, 0, 480, 320)];
 [[self view] setCenter:CGPointMake(160, 240)];
 [[self view] setTransform:CGAffineTransformMakeRotation(M_PI / 2)];

经过几次测试,两个VC都嵌套在另一个方向锁定为纵向的VC中。你不知道我是否可以在主VC上调用“shouldAutorotateToInterfaceOrientation…”方法?