遍历Xcode系统自带的字体

2017-06-27  本文已影响0人  飞不飞

-(void)typeface{

_fontArray = [[NSMutableArray alloc] initWithCapacity:242];

for (NSString * familyName in [UIFont familyNames]) {

NSLog(@"Font FamilyName = %@",familyName); //*输出字体族科名字

for (NSString * fontName in [UIFont fontNamesForFamilyName:familyName]) {

NSLog(@"\t%@",fontName);

[_fontArray addObject:fontName];

}

}

}

上一篇下一篇

猜你喜欢

热点阅读