diff options
Diffstat (limited to 'ios/MBXViewController.mm')
-rw-r--r-- | ios/MBXViewController.mm | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/ios/MBXViewController.mm b/ios/MBXViewController.mm index 3055eca981..140de2ebd0 100644 --- a/ios/MBXViewController.mm +++ b/ios/MBXViewController.mm @@ -162,6 +162,22 @@ class MBXMapView } } +- (BOOL)shouldAutorotate { + return YES; +} + +- (NSUInteger)supportedInterfaceOrientations { + return UIInterfaceOrientationMaskAll; +} + +-(void)viewWillLayoutSubviews { + [super viewWillLayoutSubviews]; + + GLKView *view = (GLKView *)self.view; + CGRect rect = [view bounds]; + mapView->map.resize(rect.size.width, rect.size.height, [view drawableWidth], [view drawableHeight]); +} + - (void)togglePalette { if (self.palette.alpha < 1) |