UIFont+Ext.m 903 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. //
  2. // UIFont+Ext.m
  3. // UniversalApp
  4. //
  5. // Created by bugu on 2020/3/21.
  6. // Copyright © 2020 voidcat. All rights reserved.
  7. //
  8. #import "UIFont+Ext.h"
  9. @implementation UIFont (Ext)
  10. // 设置 MediumFont
  11. + (UIFont*)mediumFont:(CGFloat)size {
  12. UIFont *font = [UIFont systemFontOfSize:size weight:UIFontWeightMedium];
  13. return font;
  14. }
  15. // 设置 BoldFont
  16. + (UIFont*)boldFont:(CGFloat)size {
  17. UIFont *font = [UIFont boldSystemFontOfSize:size];
  18. return font;
  19. }
  20. + (instancetype)bg_mediumFont17{
  21. return [UIFont mediumFont:17];
  22. }
  23. + (instancetype)bg_mediumFont16{
  24. return [UIFont mediumFont:16];
  25. }
  26. + (instancetype)bg_mediumFont15{
  27. return [UIFont mediumFont:15];
  28. }
  29. + (instancetype)bg_mediumFont14{
  30. return [UIFont mediumFont:14];
  31. }
  32. + (instancetype)bg_mediumFont13{
  33. return [UIFont mediumFont:13];
  34. }
  35. + (instancetype)bg_mediumFont11{
  36. return [UIFont mediumFont:11];
  37. }
  38. @end