Created
March 13, 2013 09:55
-
-
Save frederik-jacques/5150676 to your computer and use it in GitHub Desktop.
Enumerate all fonts on your IOS device with this convenience method. Handy to find the name for your custom font!
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
- (void)enumerateFonts { | |
NSLog(@"--Start enumerating font--"); | |
for (NSString *fontFamilyStrings in [UIFont familyNames]) { | |
NSLog(@"Font family: %@", fontFamilyStrings); | |
for (NSString *fontStrings in [UIFont fontNamesForFamilyName:fontFamilyStrings]) { | |
NSLog(@"-- Font: %@", fontStrings); | |
} | |
} | |
NSLog(@"--End enumerating font--"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment