diff options
-rw-r--r-- | ios/Info.plist | 2 | ||||
-rw-r--r-- | ios/MBXViewController.mm | 11 | ||||
-rw-r--r-- | src/map/tile_data.cpp | 2 |
3 files changed, 7 insertions, 8 deletions
diff --git a/ios/Info.plist b/ios/Info.plist index 04873d9d34..d78b5428e1 100644 --- a/ios/Info.plist +++ b/ios/Info.plist @@ -31,6 +31,8 @@ <key>UISupportedInterfaceOrientations</key> <array> <string>UIInterfaceOrientationPortrait</string> + <string>UIInterfaceOrientationLandscapeLeft</string> + <string>UIInterfaceOrientationLandscapeRight</string> </array> <key>UISupportedInterfaceOrientations~ipad</key> <array> diff --git a/ios/MBXViewController.mm b/ios/MBXViewController.mm index 648f2cc0ac..9e08a6ddc8 100644 --- a/ios/MBXViewController.mm +++ b/ios/MBXViewController.mm @@ -146,7 +146,7 @@ class MBXMapView paletteWidth, paletteHeight)]; self.palette.backgroundColor = [UIColor colorWithWhite:0 alpha:alpha]; - self.palette.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin; + self.palette.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin; self.palette.layer.cornerRadius = bufferSize; [self.view addSubview:self.palette]; for (NSString *selectorName in selectorNames) @@ -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 { diff --git a/src/map/tile_data.cpp b/src/map/tile_data.cpp index 4122c16acd..aa9fd06f50 100644 --- a/src/map/tile_data.cpp +++ b/src/map/tile_data.cpp @@ -58,7 +58,7 @@ void TileData::request() { tile->data.swap(res.body); tile->parse(); } else { - fprintf(stderr, "tile loading failed: code %d\n", res.code); + fprintf(stderr, "tile loading failed (%s): %d\n", url.c_str(), res.code); } }, []() { platform::restart(); |