Skip to content

Instantly share code, notes, and snippets.

@tomwilsn
Created September 23, 2015 00:02
Show Gist options
  • Save tomwilsn/42390142a0a138b06afc to your computer and use it in GitHub Desktop.
Save tomwilsn/42390142a0a138b06afc to your computer and use it in GitHub Desktop.
Print iOS font names in Swift 2
extension UIFont {
static func printFontNames() {
for familyName in UIFont.familyNames() {
print("Family name: \(familyName)")
for fontName in UIFont.fontNamesForFamilyName(familyName) {
print("Font name: \(fontName)")
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment