My application requires to support both portrait and landscape mode except one view in portrait only. I found on forums that i have to subclass Navigation controller and then use SupportedInterfaceOrientations method to handle it.
But, my app has a different layout, there is a tabbar controller as rootview controller and then each tabbar controller has its own navigation controller. i also have a login view (for authentication in app) presented on the rootview controller. Now the problem is where should i add
- (BOOL)shouldAutorotate
{
return NO;
}
- (NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskPortrait;
}
this code - in Navigation controller or Tabbar controller or in AppDelegate.