From 381d8b46997ca8b9000b29dba38e0de206856ccb Mon Sep 17 00:00:00 2001 From: jmkiley Date: Tue, 11 Sep 2018 18:25:32 -0700 Subject: [ios, macos] started to restore iOS 8 support --- platform/ios/src/MGLScaleBar.mm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'platform/ios/src/MGLScaleBar.mm') 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 { -- cgit v1.2.1