Ramesh Sangili
Ramesh Sangili

Reputation: 1631

iOS 7 Orientation not working

Team,

My application is not responding to Orientations from iOS 7 onwards. I was trying to push the screen through pushViewController, then later I changed to presentViewController

before [viewController.navigationController pushViewController:landscapeCommentScreen animated:animated];

After iOS7 upgrade:

 [viewController.navigationController presentViewController:landscapeCommentScreen animated:YES completion:nil];

added the below methods in view controller

- (NSUInteger)supportedInterfaceOrientations {
    return UIInterfaceOrientationMaskAll;
}


- (BOOL) shouldAutorotate {
    return YES;
}


- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation {
    return UIInterfaceOrientationLandscapeRight;
}

Upvotes: 0

Views: 209

Answers (1)

Léo Natan
Léo Natan

Reputation: 57040

You should not return UIInterfaceOrientationMaskAll in supportedInterfaceOrientations. You should return UIInterfaceOrientationLandscapeRight.

Upvotes: 1

Related Questions