Skip to content

Commit e674715

Browse files
committed
Merge branch 'master' into develop
2 parents 4999a46 + 006374e commit e674715

File tree

3 files changed

+21
-9
lines changed

3 files changed

+21
-9
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ It provides convenient way to store styles you can reuse in your app's UI elemen
1313

1414
| | Features Highlights |
1515
|--- |--------------------------------------------------------------------------------- |
16-
| 🦄 | Easy styling with declarative syntax |
16+
| 🦄 | Easy styling and typography managment with coincise declarative syntax |
1717
| 🏞 | Attach local and remote images inside text |
1818
| 🧬 | Fast & high customizable XML/HTML tagged string rendering |
1919
| 🌟 | Apply text transforms within styles |
@@ -61,7 +61,7 @@ self.label?.attributedText = str.set(style: myGroup)
6161

6262
That's the result!
6363

64-
<img src="Documentation_Assests/image_2.png" alt="" width=100px/>
64+
<img src="Documentation_Assests/image_2.png" alt="" width=400px/>
6565

6666
## Documentation
6767

@@ -706,7 +706,7 @@ The following properties are available:
706706
## Requirements
707707

708708
* Swift 5.1+
709-
* iOS 9.0+
709+
* iOS 8.0+
710710
* macOS 11.0+
711711
* watchOS 2.0+
712712
* tvOS 11.0+
@@ -757,4 +757,4 @@ Contributors are expected to abide by the [Contributor Covenant Code of Conduct]
757757

758758
SwiftRichString is available under the MIT license. See the LICENSE file for more info.
759759

760-
Daniele Margutti: [[email protected]](mailto:[email protected]), [@danielemargutti](https://twitter.com/danielemargutti)
760+
Daniele Margutti: [[email protected]](mailto:[email protected]), [@danielemargutti](https://twitter.com/danielemargutti)

Sources/SwiftRichString/Attributes/TextTransform.swift

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,29 @@ public enum TextTransform {
4646
switch self {
4747
case .lowercase:
4848
return { string in
49-
string.localizedLowercase
49+
if #available(iOS 9.0, iOSApplicationExtension 9.0, *) {
50+
return string.localizedLowercase
51+
} else {
52+
return string.lowercased(with: Locale.current)
53+
}
5054
}
5155

5256
case .uppercase:
5357
return { string in
54-
string.localizedUppercase
58+
if #available(iOS 9.0, iOSApplicationExtension 9.0, *) {
59+
return string.localizedUppercase
60+
} else {
61+
return string.uppercased(with: Locale.current)
62+
}
5563
}
5664

5765
case .capitalized:
5866
return { string in
59-
string.localizedCapitalized
67+
if #available(iOS 9.0, iOSApplicationExtension 9.0, *) {
68+
return string.localizedCapitalized
69+
} else {
70+
return string.capitalized(with: Locale.current)
71+
}
6072
}
6173

6274
case .lowercaseWithLocale(let locale):

SwiftRichString.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1636,7 +1636,7 @@
16361636
DYLIB_INSTALL_NAME_BASE = "@rpath";
16371637
INFOPLIST_FILE = Configs/SwiftRichString.plist;
16381638
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
1639-
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
1639+
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
16401640
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
16411641
MACOSX_DEPLOYMENT_TARGET = 10.11;
16421642
MARKETING_VERSION = 3.5.0;
@@ -1661,7 +1661,7 @@
16611661
DYLIB_INSTALL_NAME_BASE = "@rpath";
16621662
INFOPLIST_FILE = Configs/SwiftRichString.plist;
16631663
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
1664-
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
1664+
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
16651665
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
16661666
MACOSX_DEPLOYMENT_TARGET = 10.11;
16671667
MARKETING_VERSION = 3.5.0;

0 commit comments

Comments
 (0)