Created
May 20, 2018 13:20
-
-
Save malcommac/5c7ead5425ee4e0207439d52d82966ca to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let body: Style = Style { ... } | |
let big: Style = Style { ... } | |
let attributed: AttributedString = "hello ".set(style: body) | |
// the following code produce an attributed string by | |
// concatenating an attributed string and two plain string | |
// (one styled and another plain). | |
let attStr = attributed + "\(username)!".set(style:big) + ". You are welcome!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment