Created
May 20, 2018 13:17
-
-
Save malcommac/14e1361d7acff0a099a0ba121ddf3379 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 base = Style { | |
$0.font = SystemFonts.Helvetica.font(size: 12) | |
} | |
let h1 = Style { | |
$0.font = SystemFonts.Helvetica_Bold.font(size: 15) | |
$0.color = UIColor.red | |
} | |
let h2 = h1.byAdding { | |
$0.alignment = .center | |
$0.traitVariants = [TraitVariant.italic] | |
} | |
Styles.register("MyStyle", style: StyleGroup(base: base, ["h1" : h1, "h2" : h2])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment