I have some views in my app that I don\'t want to suport orientation.
In didFinishLaunchingWithOptions
I add navigation:
...
UINavigationControl
It's because neither UITabBarcontroller
nor UINavigationController
is passing shouldAutorotate to its visible view controller. To fix that you may subclass either UITabBarController or UINavigationController and forward shouldAutorotate from there:
In your subclassed UITabBarController add:
- (BOOL)shouldAutorotate
{
return [self.selectedViewController shouldAutorotate];
}
In your subclassed UINavigationController add:
- (BOOL)shouldAutorotate
{
return [self.visibleViewController shouldAutorotate];
}