2

我有一个只有肖像的 VC,它呈现了一个只有风景的 VC。我正在努力看看如何让它发挥作用。我很幸运地调用了一个动画来旋转模态 VC,但它看起来有点狡猾。

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

我想要的是......

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

谢谢你的帮助

4

1 回答 1

5

在 PortraitVC 的 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)];
于 2012-06-18T16:34:21.857 回答