summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2018-03-06 00:57:36 -0800
committerMinh Nguyễn <mxn@1ec5.org>2018-03-07 17:31:01 -0800
commit9f708d80f4c1a776e590f9feafc9c65a93418fbd (patch)
treee847db27ea661c8bf4676bd7f5cdc758cafa97c1 /platform
parent6c0599b536cb3f2e6e583b3e33fc6bcc547cda37 (diff)
downloadqtlocation-mapboxgl-9f708d80f4c1a776e590f9feafc9c65a93418fbd.tar.gz
[macos] Fixed title casing based on current orthography
Diffstat (limited to 'platform')
-rw-r--r--platform/darwin/src/NSString+MGLAdditions.m6
1 files changed, 5 insertions, 1 deletions
diff --git a/platform/darwin/src/NSString+MGLAdditions.m b/platform/darwin/src/NSString+MGLAdditions.m
index 8c9bbe3e21..a61f229511 100644
--- a/platform/darwin/src/NSString+MGLAdditions.m
+++ b/platform/darwin/src/NSString+MGLAdditions.m
@@ -1,5 +1,9 @@
#import "NSString+MGLAdditions.h"
+#if TARGET_OS_OSX
+ #import <Availability.h>
+#endif
+
@implementation NSString (MGLAdditions)
- (NSRange)mgl_wholeRange {
@@ -13,7 +17,7 @@
- (NSString *)mgl_titleCasedStringWithLocale:(NSLocale *)locale {
NSMutableString *string = self.mutableCopy;
NSOrthography *orthography;
-#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000
+#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000 || __MAC_OS_X_VERSION_MAX_ALLOWED >= 101300
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunguarded-availability-new"
if ([NSOrthography respondsToSelector:@selector(defaultOrthographyForLanguage:)]) {