diff options
author | Jason Wray <jason@mapbox.com> | 2018-01-05 04:08:44 -0500 |
---|---|---|
committer | Jason Wray <jason@mapbox.com> | 2018-02-27 18:27:42 -0500 |
commit | ab27e24ab0dd906668d73d35cbece8768dfd02c8 (patch) | |
tree | 34a3a274a660284b41041176f21d5aa341f9ecdb /platform/ios/app/MBXViewController.m | |
parent | 68a9e2ea926db80010ade77cda77ced53d412b28 (diff) | |
download | qtlocation-mapboxgl-ab27e24ab0dd906668d73d35cbece8768dfd02c8.tar.gz |
[ios] Restore iosapp's HUD visibility, adjust placement
Diffstat (limited to 'platform/ios/app/MBXViewController.m')
-rw-r--r-- | platform/ios/app/MBXViewController.m | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/platform/ios/app/MBXViewController.m b/platform/ios/app/MBXViewController.m index 3d0abf0a24..5b9363af27 100644 --- a/platform/ios/app/MBXViewController.m +++ b/platform/ios/app/MBXViewController.m @@ -166,7 +166,6 @@ typedef NS_ENUM(NSInteger, MBXSettingsMiscellaneousRows) { self.debugLoggingEnabled = [[NSUserDefaults standardUserDefaults] boolForKey:@"MGLMapboxMetricsDebugLoggingEnabled"]; self.mapView.scaleBar.hidden = NO; self.mapView.showsUserHeadingIndicator = YES; - self.hudLabel.hidden = YES; if ([UIFont respondsToSelector:@selector(monospacedDigitSystemFontOfSize:weight:)]) { self.hudLabel.titleLabel.font = [UIFont monospacedDigitSystemFontOfSize:10 weight:UIFontWeightRegular]; } @@ -216,6 +215,7 @@ typedef NS_ENUM(NSInteger, MBXSettingsMiscellaneousRows) { [defaults setInteger:self.mapView.userTrackingMode forKey:@"MBXUserTrackingMode"]; [defaults setBool:self.mapView.showsUserLocation forKey:@"MBXShowsUserLocation"]; [defaults setInteger:self.mapView.debugMask forKey:@"MBXDebugMask"]; + [defaults setBool:self.showZoomLevelEnabled forKey:@"MBXShowsZoomLevelHUD"]; [defaults synchronize]; } @@ -241,6 +241,11 @@ typedef NS_ENUM(NSInteger, MBXSettingsMiscellaneousRows) { { self.mapView.debugMask = (MGLMapDebugMaskOptions)uncheckedDebugMask; } + if ([defaults boolForKey:@"MBXShowsZoomLevelHUD"]) + { + self.showZoomLevelEnabled = YES; + [self updateHUD]; + } } - (UIInterfaceOrientationMask)supportedInterfaceOrientations @@ -1898,6 +1903,8 @@ typedef NS_ENUM(NSInteger, MBXSettingsMiscellaneousRows) { - (void)updateHUD { if (!self.reuseQueueStatsEnabled && !self.showZoomLevelEnabled) return; + if (self.hudLabel.hidden) self.hudLabel.hidden = NO; + NSString *hudString; if (self.reuseQueueStatsEnabled) { |