Check out:
https://developer.apple.com/library/archive/qa/qa1688/_index.html
Note:
So the Info.plist should allow all orientations and the code in the viewControllers that don't rotate should include:
-(BOOL) shouldAutorotate{
return NO;
}
I believe this will leave that viewController in portrait, but I'm not sure. You might have to do this
https://developer.apple.com/documentation/uikit/uiviewcontroller/1621435-supportedinterfaceorientations?language=objc
That involves:
// In the viewControllers that you want to be portrait:
- (UIInterfaceOrientationMask)supportedInterfaceOrientations{
return UIInterfaceOrientationMaskPortrait;
}
//and also in the viewDidLoad method
[[UIDevice currentDevice] setValue:[NSNumber numberWithInt:UIDeviceOrientationPortrait] forKey:@"orientation"];