summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmkiley <jordan.kiley@mapbox.com>2018-10-05 16:46:20 -0700
committerjmkiley <jordan.kiley@mapbox.com>2018-10-05 16:46:20 -0700
commit72eba4d8614acd09d2408a983f8d99313ff9b995 (patch)
treef21f7c59439515be6ea8f835d6c49002f4851ed0
parentb2833a3cd1c0fb05d49550dc944f3b66c02441aa (diff)
downloadqtlocation-mapboxgl-72eba4d8614acd09d2408a983f8d99313ff9b995.tar.gz
[ios] update iosapp
-rw-r--r--platform/ios/app/MBXOfflinePacksTableViewController.m6
-rw-r--r--platform/ios/app/MBXViewController.m9
-rw-r--r--platform/ios/benchmark/MBXBenchViewController.mm6
3 files changed, 15 insertions, 6 deletions
diff --git a/platform/ios/app/MBXOfflinePacksTableViewController.m b/platform/ios/app/MBXOfflinePacksTableViewController.m
index 959ae57548..46a032dae7 100644
--- a/platform/ios/app/MBXOfflinePacksTableViewController.m
+++ b/platform/ios/app/MBXOfflinePacksTableViewController.m
@@ -119,8 +119,10 @@ static NSString * const MBXOfflinePacksTableViewActiveCellReuseIdentifier = @"Ac
}];
}];
[alertController addAction:downloadAction];
- alertController.preferredAction = downloadAction;
-
+ if ([UIAlertController respondsToSelector:@selector(preferredAction)]) {
+ alertController.preferredAction = downloadAction;
+ }
+
[self presentViewController:alertController animated:YES completion:nil];
}
diff --git a/platform/ios/app/MBXViewController.m b/platform/ios/app/MBXViewController.m
index 02652b5490..297a9f0395 100644
--- a/platform/ios/app/MBXViewController.m
+++ b/platform/ios/app/MBXViewController.m
@@ -237,7 +237,9 @@ CLLocationCoordinate2D randomWorldCoordinate() {
self.debugLoggingEnabled = [[NSUserDefaults standardUserDefaults] boolForKey:@"MGLMapboxMetricsDebugLoggingEnabled"];
self.mapView.showsScale = YES;
self.mapView.showsUserHeadingIndicator = YES;
- self.hudLabel.titleLabel.font = [UIFont monospacedDigitSystemFontOfSize:10 weight:UIFontWeightRegular];
+ if ([UIFont respondsToSelector:@selector(monospacedDigitSystemFontOfSize:weight:)]) {
+ self.hudLabel.titleLabel.font = [UIFont monospacedDigitSystemFontOfSize:10 weight:UIFontWeightRegular];
+ }
if ([MGLAccountManager accessToken].length)
{
@@ -267,7 +269,10 @@ CLLocationCoordinate2D randomWorldCoordinate() {
[self.mapView reloadStyle:self];
}];
[alertController addAction:OKAction];
- alertController.preferredAction = OKAction;
+ if ([UIAlertController respondsToSelector:@selector(preferredAction)]) {
+ alertController.preferredAction = OKAction;
+ }
+
[self presentViewController:alertController animated:YES completion:nil];
}
diff --git a/platform/ios/benchmark/MBXBenchViewController.mm b/platform/ios/benchmark/MBXBenchViewController.mm
index 84c2790d50..23a22f3af1 100644
--- a/platform/ios/benchmark/MBXBenchViewController.mm
+++ b/platform/ios/benchmark/MBXBenchViewController.mm
@@ -76,8 +76,10 @@
[self startBenchmarkIteration];
}];
[alertController addAction:OKAction];
- alertController.preferredAction = OKAction;
-
+ if ([UIAlertController respondsToSelector:@selector(preferredAction)]) {
+ alertController.preferredAction = OKAction;
+ }
+
[self presentViewController:alertController animated:YES completion:nil];
}
}