Last active
April 8, 2019 03:23
-
-
Save marinofelipe/824d12a71f6f573e87197659ef616097 to your computer and use it in GitHub Desktop.
Blog post / Dynamic Type - Setting a scaled custom font using UIFontMetrics with title1 text style
This file contains hidden or 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
| if #available(iOS 11.0, *) { | |
| if let font = UIFont(name: "custom", size: 20.0) { | |
| label.font = UIFontMetrics(forTextStyle: .title1).scaledFont(for: font) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment