Created
May 2, 2015 23:03
-
-
Save jungchris/a24815324319d757de01 to your computer and use it in GitHub Desktop.
Function to iterate available iOS Fonts
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
// Source: http://codewithchris.com/common-mistakes-with-adding-custom-fonts-to-your-ios-app/ | |
- (void)viewDidLoad { | |
[super viewDidLoad]; | |
// iterate through all available fonts | |
for (NSString* family in [UIFont familyNames]) | |
{ | |
NSLog(@"%@", family); | |
for (NSString* name in [UIFont fontNamesForFamilyName: family]) | |
{ | |
NSLog(@" %@", name); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment