Xcode orientation changes every-time before presentViewController

66 views Asked by At

My app supports UIInterfaceOrientationMaskAll. And All the ViewControllers only support UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskPortraitUpsideDown except two ViewControllers. This two ViewControllers support UIInterfaceOrientationMaskAll.

The problem is that on iPad everything is perfect, but on iPhone, if each Viewcontroller stays UIInterfaceOrientationMaskPortrait, when I run

[currentViewController presentViewController:nextViewController1 animated:YES completion:nil];

currentViewController changes its orientation to UIInterfaceOrientationMaskPortraitUpsideDown, then presents nextViewController1 in UIInterfaceOrientationMaskPortrait.

[nextViewController1 presentViewController:nextViewController2 animated:YES completion:nil];

nextViewController1 changes its orientation to UIInterfaceOrientationMaskPortraitUpsideDown, then presents nextViewController2 in UIInterfaceOrientationMaskPortrait.

0

There are 0 answers