Created
October 30, 2012 15:56
-
-
Save ahmattox/3981130 to your computer and use it in GitHub Desktop.
List all fonts and styles available on an iOS device.
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
- (void) listFonts { | |
NSArray *familyNames = [UIFont familyNames]; | |
for (NSString *family in familyNames) { | |
NSLog(@"family: %@", family); | |
NSArray *styles = [UIFont fontNamesForFamilyName:family]; | |
for (NSString *style in styles) { | |
NSLog(@" - %@", style); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment