diff options
author | jmkiley <jordan.kiley@mapbox.com> | 2018-09-11 18:25:32 -0700 |
---|---|---|
committer | jmkiley <jordan.kiley@mapbox.com> | 2018-09-11 18:25:32 -0700 |
commit | 381d8b46997ca8b9000b29dba38e0de206856ccb (patch) | |
tree | cdd47319c1af67be2cecd042bb98d4aca1b76c51 /platform/ios/src/MGLScaleBar.mm | |
parent | 1efec00dc959ee5606ff4db06f7c4e1cd48a5c39 (diff) | |
download | qtlocation-mapboxgl-upstream/ios8-release-frappe.tar.gz |
[ios, macos] started to restore iOS 8 supportupstream/ios8-release-frappe
Diffstat (limited to 'platform/ios/src/MGLScaleBar.mm')
-rw-r--r-- | platform/ios/src/MGLScaleBar.mm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/platform/ios/src/MGLScaleBar.mm b/platform/ios/src/MGLScaleBar.mm index d69fb3e852..a180280adc 100644 --- a/platform/ios/src/MGLScaleBar.mm +++ b/platform/ios/src/MGLScaleBar.mm @@ -205,7 +205,11 @@ static const CGFloat MGLFeetPerMeter = 3.28084; #pragma mark - Convenience methods - (BOOL)usesRightToLeftLayout { - return [UIView userInterfaceLayoutDirectionForSemanticContentAttribute:self.superview.semanticContentAttribute] == UIUserInterfaceLayoutDirectionRightToLeft; + if ([self.superview respondsToSelector:@selector(semanticContentAttribute)]) { + return [UIView userInterfaceLayoutDirectionForSemanticContentAttribute:self.superview.semanticContentAttribute] == UIUserInterfaceLayoutDirectionRightToLeft; + } else { + return UIApplication.sharedApplication.userInterfaceLayoutDirection == UIUserInterfaceLayoutDirectionRightToLeft; + } } - (BOOL)usesMetricSystem { |