For all ViewController in the application it is allowed to use only portrait orientation:

AppDelegate.m

 -(NSUInteger)allpication:(UIApplication*)application supportedInterfaceOrientationsForWindow:(UIWindow*)window { return UIInterfaceOrientationMaskPortrait; } 

However, for one of the ViewController that is part of the NavigationViewController stack, I want to make other screen orientation options available when I push it.

There is a suspicion that for

 pushViewController:animated: 

it will not work. Only for option with

 presentViewController:animated:completion: 

https://stackoverflow.com/a/29367703

In particular, I am trying to ensure that the MWPhotoBrowser can rotate the screen when viewing full-size photos. In this case, his subclass must necessarily be put down ...

1 answer 1

I suggest you not to prohibit specific orientations in the infoplist . Create 1 root view controller , implement in it a method -(UIInterfaceOrientationMask)supportedInterfaceOrientation . In it, write down the orientation that you need and tell all your controllers from it. And the controller that you want to give the opportunity to use other orientations - do not inherit from the root one.