From 9f5a313e3749d3338638c75c547be550d5b5615b Mon Sep 17 00:00:00 2001 From: "Justin R. Miller" Date: Thu, 10 Apr 2014 11:28:43 -0700 Subject: [PATCH] update supported iOS orientations --- ios/Info.plist | 2 ++ ios/MBXViewController.mm | 9 +++------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/ios/Info.plist b/ios/Info.plist index 04873d9d3..d78b5428e 100644 --- a/ios/Info.plist +++ b/ios/Info.plist @@ -31,6 +31,8 @@ UISupportedInterfaceOrientations UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight UISupportedInterfaceOrientations~ipad diff --git a/ios/MBXViewController.mm b/ios/MBXViewController.mm index 140de2ebd..87373b120 100644 --- a/ios/MBXViewController.mm +++ b/ios/MBXViewController.mm @@ -162,12 +162,9 @@ class MBXMapView } } -- (BOOL)shouldAutorotate { - return YES; -} - -- (NSUInteger)supportedInterfaceOrientations { - return UIInterfaceOrientationMaskAll; +- (NSUInteger)supportedInterfaceOrientations +{ + return ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad ? UIInterfaceOrientationMaskAll : UIInterfaceOrientationMaskAllButUpsideDown); } -(void)viewWillLayoutSubviews {