You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<palign="center" >★★ <b>Star me to follow the project! </b> ★★<br>
11
-
Created by <b>Daniele Margutti</b> - <ahref="http://www.danielemargutti.com">danielemargutti.com</a>
12
-
</p>
13
-
14
10
15
11
SwiftRichString is a lightweight library which allows to create and manipulate attributed strings easily both in iOS, macOS, tvOS and even watchOS.
16
-
It provides convenient way to store styles you can reuse in your app's UI lements, allows complex tag-based strings rendering and also includes integration with Interface Builder.
12
+
It provides convenient way to store styles you can reuse in your app's UI elements, allows complex tag-based strings rendering and also includes integration with Interface Builder.
13
+
14
+
It even support **iOS 11's Dynamic Type**!
17
15
18
16
If you manipulate `NSAttributedString` in Swift, SwiftRichString allows you to keep your code manteniable, readable and easy to evolve.
@@ -115,6 +95,8 @@ Full changelog is available in [CHANGELOG.md](CHANGELOG.md) file.
115
95
- [Apply styles to `String` & `Attributed String`](#manualstyling)
116
96
- [Fonts & Colors in `Style`](#fontscolors)
117
97
- [Derivating a `Style`](#derivatingstyle)
98
+
- [Support iOS's `Dynamic Type`](#dynamictype)
99
+
- [Dynamic Attributes from Tag's Params](#dynamicattributes)
118
100
- [The `StyleManager`](#stylemanager)
119
101
- [Register globally available styles](#globalregister)
120
102
- [Defer style creation on demand](#defer)
@@ -359,7 +341,47 @@ let subStyle = bold.byAdding {
359
341
$0.alignment= center
360
342
$0.color= UIColor.red
361
343
}
344
+
```
345
+
346
+
<a name="dynamictype"/>
347
+
348
+
### Conforming to `Dynamic Type`
349
+
350
+
To support your fonts/text to dynammically scale based on the users preffered content size, you can implement style's `dynamicText` property. UIFontMetrics properties are wrapped inside `DynamicText` class.
0 commit comments