Last active
January 24, 2016 02:38
-
-
Save radiovisual/58c411e6cb3932c0fbfa to your computer and use it in GitHub Desktop.
Render all your iOS app font names into an NSString that can then be placed within an NSArray
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
// Create an NSString that can that be copied into an NSArray | |
// of all the font names available to your Objective-C App | |
NSMutableString *str = [[NSMutableString alloc] initWithString:@""]; | |
for (NSString *family in [UIFont familyNames]) { | |
[str appendString:@"//"]; | |
[str appendString:family]; | |
[str appendString:@"\n"]; | |
for (NSString *name in [UIFont fontNamesForFamilyName: family]) { | |
NSString *arrayStr = [NSString stringWithFormat:@" @\"%@\", ", name]; | |
[str appendString:arrayStr]; | |
[str appendString:@"\n"]; | |
} | |
} | |
NSLog(@"%@", str); | |
Author
radiovisual
commented
Jan 24, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment