I've come up with a strange scenario, I'm using one NavigationViewController and one ViewController (named- container) in my MainWindow.xib.
NavigationController loads subsequent views, and in parallel, the other ViewController (container) loads some images on top of everything - No matter what view is displayed by the NavigationViewController.
When I rotate the device, the subsequent views of NavigationController rotates as expected but the container and its subsequent views do not rotate.
Here is the screenshot of my MainWindow.xib
and here is the code.
in .h
UINavigationController *navigationController;
IBOutlet UIViewController *container;
in .m (ApplicationDidFinishLaunchingWithOptions)
[window addSubview:navigationController.view];
[window addSubview:container.view];
[window makeKeyAndVisible];
I've also tried creating a separate class and assigned it to the viewController. (Its ViewDidLoad) Method fires but it doesn't come in the (ShouldRotateToInterfaceOrientation)
I read somewhere that IOS doesn't support the orientation for multiple ViewControllers.
I think you should try this because you are trying to use tow views in one navigation.So dont make sub view of window,make subview of main View like:-
I have't try this code but i am just suggesting idea. thanks.