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 {