0

App comprises 5 pages with mesh like hierarchy i.e each page can be reached from any page. Each page have portrait and landscape orientation support.

So i am not able to handle the rotation when pushing and poping the view controllers from navigation controller.

Can any one suggest me the required approach which can be useful in implementing the above.

thanks.

Sanjay
  • 83
  • 2
  • 11

1 Answers1

1

This is probably a problem with iOS 6. UINavigationController does not automatically call supportedInterfaceOrientations: unless you tell it to.

Check out the answers to this question.

Creating a category seems like the best solution.

@implementation UINavigationController (iOS6OrientationFix)

-(BOOL) shouldAutorotate {
    return [self.topViewController shouldAutorotate];
} 

-(NSUInteger) supportedInterfaceOrientations {
    return [self.topViewController supportedInterfaceOrientations];
}

@end
Community
  • 1
  • 1
wsidell
  • 712
  • 7
  • 14