Reputation: 750
Interface orientation support is enabled in my .plist file. But I need to enable landscape orientation only in one viewController. In other viewControllers I can't disable landscape mode. Please, tell me how I can disable landscape mode in all viewControllers except one.
Upvotes: 1
Views: 2026
Reputation: 4671
You can use
- (BOOL) shouldAutorotate
{
return YES;
}
-(NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskLandscapeRight | UIInterfaceOrientationMaskLandscapeLeft | UIInterfaceOrientationMaskPortrait;
//return here which orientation you are going to support
}
Upvotes: 1