I have iPAD app which has UIViewController A as root view Controller of Navigation Controller. Now i have 3 more View Controllers B,C, D as subview of ViewController A.
I want B not to respond orientation while C and D should respond to it.
Currently with code all of them respond to orientation change.
There was another answer which says make two separate root ViewControllers and add them into windows View. One of them non rotating and other rotating. I cant do that because i have header in ViewController A which switches B,C,D to make them front viewController.
Anyway please suggest.
Thanks
You need to subclass the UINavigationController like this.
.H
.M
You can create subclass from UINavigationController or make category for it. And implement this methods:
And then, in your controllers you should implement this methods with orientations which you want.