diff --git a/Classes/Controllers/NavigationController.m b/Classes/Controllers/NavigationController.m index ab7d0781..9a742b03 100644 --- a/Classes/Controllers/NavigationController.m +++ b/Classes/Controllers/NavigationController.m @@ -11,6 +11,7 @@ #import "LoginController.h" #import "UIColor+Orange.h" #import "HackerNewsLoginController.h" +#import "BrowserController.h" @implementation NavigationController @synthesize loginDelegate; @@ -87,6 +88,18 @@ - (void)requestSessions { [loginDelegate navigationControllerRequestedSessions:self]; } -AUTOROTATION_FOR_PAD_ONLY +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation { + if ([self.visibleViewController class] == [BrowserController class]) { + return YES; + } + return ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) || (toInterfaceOrientation == UIInterfaceOrientationPortrait); +} + +- (NSUInteger)supportedInterfaceOrientations { + if ([self.visibleViewController class] == [BrowserController class]) { + return UIInterfaceOrientationMaskAll; + } + return ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad ? UIInterfaceOrientationMaskAll : UIInterfaceOrientationMaskPortrait); +} @end diff --git a/Info.plist b/Info.plist index 5de22647..ea4f4381 100644 --- a/Info.plist +++ b/Info.plist @@ -43,7 +43,7 @@ Blue 0 Green - 0.4 + 0.40000000000000002 Red 1 @@ -51,6 +51,12 @@ + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + UISupportedInterfaceOrientations~ipad UIInterfaceOrientationPortrait