I did not test it myself, but the documentation states that you can now override those methods: supportedInterfaceOrientations and preferredInterfaceOrientationForPresentation.
You can probably achieve what you want y setting only the orientation that you want in those methods.
So I ran into the same problem when displaying portrait only modal views. Normally, I'd create a UINavigationController, set the viewController as the rootViewController, then display the UINavigationController as a modal view. But with iOS 6, the viewController will now ask the navigationController for its supported interface orientations (which, by default, is now all for iPad and everything but upside down for iPhone).
Solution: I had to subclass UINavigationController and override the autorotation methods. Kind of lame.
Not to be dull here, but would you be so kind to share your subclass? Thank you.
edit: well, I finally did it, the subclass was dead simple to do. I just had to declare the navigationController in the AppDelegate as UINavigationControllerSubclass instead of the default UINavigationController, then modified your subclass with:
If you want all of our navigation controllers to respect the top view controller you can use a category so you don't have to go through and change a bunch of class names.
As a few of the comments point to, this is a quick fix to the problem. A better solution is subclass UINavigationController and put these methods there. A subclass also helps for supporting 6 and 7.
The best way for iOS6 specifically is noted in "iOS6 By Tutorials" by the Ray Wenderlich team - http://www.raywenderlich.com/ and is better than subclassing UINavigationController for most cases.
I'm using iOS6 with a storyboard that includes a UINavigationController set as the initial view controller.
//AppDelegate.m - this method is not available pre-iOS6 unfortunately
I disagree from @aprato answer, because the UIViewController rotation methods are declared in categories themselves, thus resulting in undefined behavior if you override then in another category. Its safer to override them in a UINavigationController (or UITabBarController) subclass
Also, this does not cover the scenario where you push / present / pop from a Landscape view into a portrait only VC or vice-versa.
To solve this tough issue (never addressed by Apple), you should:
I have a relatively complex universal app using UISplitViewController and UISegmentedController, and have a few views that must be presented in Landscape using presentViewController. Using the methods suggested above, I was able to get iPhone ios 5 & 6 to work acceptably, but for some reason the iPad simply refused to present as Landscape. Finally, I found a simple solution (implemented after hours of reading and trial and error) that works for both devices and ios 5 & 6.
Step 1) On the controller, specify the required orientation (more or less as noted above)
Interestingly, at the time of writing, either the present or dismiss must be animated. If neither are, then you will get a white screen. No idea why this makes it work, but it does! The visual effect is different depending on which is animated.
The answers using subclasses or categories to allow VCs within UINavigationController and UITabBarController classes work well. Launching a portrait-only modal from a landscape tab bar controller failed. If you need to do this, then use the trick of displaying and hiding a non-animated modal view, but do it in the viewDidAppear method. It didn't work for me in viewDidLoad or viewWillAppear.
I see the many answer but not get the particular idea and answer about the orientation but see the link good understand the orientation and remove the forcefully rotation for ios6.