Created
July 15, 2017 14:16
-
-
Save unledrob/fb11cf7a155fcb578e3e7a1da621b607 to your computer and use it in GitHub Desktop.
Get the installed font for an iOS application. This helps instantiating a new UIFont by name since the name is sometimes not apparent. Note: be sure to add the font to Info.plist first.
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
| // THANKS: http://codewithchris.com/common-mistakes-with-adding-custom-fonts-to-your-ios-app/ | |
| for family: String in UIFont.familyNames { | |
| print("\(family)") | |
| for names: String in UIFont.fontNames(forFamilyName: family) { | |
| print("== \(names)") | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment