UIFont

  1. UIKIT_EXTERN const UIFontWeight UIFontWeightUltraLight // 超细字体
  2. UIKIT_EXTERN const UIFontWeight UIFontWeightThin // 纤细字体
  3. UIKIT_EXTERN const UIFontWeight UIFontWeightLight // 轻量字体
  4. UIKIT_EXTERN const UIFontWeight UIFontWeightRegular // 常规字体
  5. UIKIT_EXTERN const UIFontWeight UIFontWeightMedium // 中等字体
  6. UIKIT_EXTERN const UIFontWeight UIFontWeightSemibold // 半粗字体
  7. UIKIT_EXTERN const UIFontWeight UIFontWeightBold // 加粗字体
  8. UIKIT_EXTERN const UIFontWeight UIFontWeightHeavy // 重粗字体
  9. UIKIT_EXTERN const UIFontWeight UIFontWeightBlack // 最粗字体

获取字体方法

NSArray *array = [UIFont familyNames];
NSString *familyName ;
NSMutableArray *fontNames = [[NSMutableArray alloc] init];
for(familyName in array)  {
  NSArray *names = [UIFont fontNamesForFamilyName:familyName];
  [fontNames addObjectsFromArray:names];
}
原文地址:https://www.cnblogs.com/jztsdwn/p/14505462.html