diff options
author | Jason Wray <jason@mapbox.com> | 2018-01-09 16:09:41 -0500 |
---|---|---|
committer | Jason Wray <jason@mapbox.com> | 2018-01-10 17:26:11 -0500 |
commit | 0806e16eb390d9eb7db3157e23798f4010614aca (patch) | |
tree | e4e8a2d83ea49df8ec83b6d16e9f1c0b83a20140 /platform/darwin/src/NSString+MGLAdditions.h | |
parent | c9da6e495900cfe927d1f571e1687b20e0543dbd (diff) | |
download | qtlocation-mapboxgl-0806e16eb390d9eb7db3157e23798f4010614aca.tar.gz |
[ios] Fix and expand accessibility feature transliteration
- Fixed pre-iOS 11 compatibility.
- Expanded transliteration to all supported languages.
Diffstat (limited to 'platform/darwin/src/NSString+MGLAdditions.h')
-rw-r--r-- | platform/darwin/src/NSString+MGLAdditions.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/platform/darwin/src/NSString+MGLAdditions.h b/platform/darwin/src/NSString+MGLAdditions.h index d82ecaa671..75c593c10b 100644 --- a/platform/darwin/src/NSString+MGLAdditions.h +++ b/platform/darwin/src/NSString+MGLAdditions.h @@ -20,6 +20,20 @@ NS_ASSUME_NONNULL_BEGIN */ - (NSString *)mgl_titleCasedStringWithLocale:(NSLocale *)locale; +/** + Returns a transliterated representation of the receiver using the specified + script. If transliteration fails, the receiver will be returned. + + Only supports scripts for languages used by Mapbox Streets. + + On iOS 8 or older, this will method will always return the untransliterated + receiver. + + @param script The four-letter code representing the name of the script, as + specified by ISO 15924. + */ +- (NSString *)mgl_stringByTransliteratingIntoScript:(NSString *)script; + @end @interface NSAttributedString (MGLAdditions) |