Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
huebnerob authored Jul 31, 2017
1 parent 5132712 commit a41d3a2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# StyledText
StyledText is a library that simplifies styling dynamic text in iOS applications. Instead of having to use attributed strings every time you need to update text, you can declaratively set a text style on your labels. When the text of the label is updated, the label uses the preset style.

<p align='center'>
<img src='https://user-images.githubusercontent.com/4182788/28786080-1f616a70-75e6-11e7-84cc-7740406a365b.png' width=300 align='center'>
</p>

## Before

``` swift
Expand Down Expand Up @@ -74,6 +78,10 @@ let redStyle = style.with(color: .red)

## Dynamic Type Support

<p align='center'>
<img src='https://user-images.githubusercontent.com/4182788/28786100-2fd9c528-75e6-11e7-8c5d-935598cf5147.gif' width=300 align='center'>
</p>

StyledText supports scaling text content to the system font size, a feature Apple calls [Dynamic Type](https://useyourloaf.com/blog/supporting-dynamic-type/). To use this feature, set the `dynamicTypeBehavior` property of a `TextStyle` to one of these values:

* `noScaling`: [default] keep the font size constant, even when the system font size changes
Expand Down

0 comments on commit a41d3a2

Please sign in to comment.