美文网首页
iOS 获取全部字体的Fontfamily和FontName

iOS 获取全部字体的Fontfamily和FontName

作者: tianheng | 来源:发表于2018-01-23 15:25 被阅读0次
    NSArray* familys = [UIFont familyNames];  
      
    for (int i = 0; i<[familys count]; i++) {  
          
        NSString* family = [familys objectAtIndex:i];  
        NSLog(@"\r\n\r\nFontfamily:%@\r\n=====",family);  
      
        NSArray* fonts = [UIFont fontNamesForFamilyName:family];  
      
        for (int j = 0; j<[fonts count]; j++) {  
          
            NSLog(@"%@",[fonts objectAtIndex:j]);  
        }  
    }  
    

    相关文章

      网友评论

          本文标题:iOS 获取全部字体的Fontfamily和FontName

          本文链接:https://www.haomeiwen.com/subject/wgkawxtx.html