Kisel Alexander
Kisel Alexander

Reputation: 750

How to disable the interface orientation change in ios 7

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

Answers (1)

Bhumeshwer katre
Bhumeshwer katre

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

Related Questions