I have the following category defined to allow orientation in a TabBarController
@implementation UITabBarController (MyApp)
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationPortrait || interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}
@end
Now there are a couple of viewcontroller
s where I don't want to allow landscape-mode. Because I used categories the methods in the viewcontroller
s are ignored. Is there a way to solve this?
(I know you can subclass UITabBarController
but this is discouraged by Apple themself).