#pragma mark - LandScapeUINavigation
@interface UINavigationController (LandScapeUINavigation)
- (BOOL)shouldAutorotate;
@end
@implementation UINavigationController (LandScapeUINavigation)
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
//NSLog(@"Nav shouldAutorotateToInterfaceOrientation");
return [self.topViewController shouldAutorotateToInterfaceOrientation:interfaceOrientation];
}
- (BOOL)shouldAutorotate
{
//NSLog(@"Nav shouldAutorotate");
return YES;
}
- (NSUInteger)supportedInterfaceOrientations
{
//NSLog(@"Nav supportedInterfaceOrientations:%ld", [self.topViewController supportedInterfaceOrientations]);
return [self.topViewController supportedInterfaceOrientations];
}
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
{
//NSLog(@"Nav preferredInterfaceOrientationForPresentation");
return [self.topViewController preferredInterfaceOrientationForPresentation];
}
- (UIStatusBarStyle)preferredStatusBarStyle {
return [self.topViewController preferredStatusBarStyle];
}
- (BOOL)prefersStatusBarHidden
{
return [self.topViewController prefersStatusBarHidden];
}
@end