UIFont+Extension.swift 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. //
  2. // UIFont+Extension.swift
  3. // MTP2_iOS
  4. //
  5. // Created by Handy_Cao on 2020/8/8.
  6. // Copyright © 2020 Muchinfo. All rights reserved.
  7. //
  8. import Foundation
  9. extension UIFont {
  10. /// font_12
  11. static var font_12: UIFont {
  12. get {
  13. return UIFont.systemFont(ofSize: 12)
  14. }
  15. }
  16. /// font_10
  17. static var font_10: UIFont {
  18. get {
  19. return UIFont.systemFont(ofSize: 10)
  20. }
  21. }
  22. /// font_8
  23. static var font_8: UIFont {
  24. get {
  25. return UIFont.systemFont(ofSize: 8)
  26. }
  27. }
  28. /// font_13
  29. static var font_13: UIFont {
  30. get {
  31. return UIFont.systemFont(ofSize: 13)
  32. }
  33. }
  34. /// font_14
  35. static var font_14: UIFont {
  36. get {
  37. return UIFont.systemFont(ofSize: 14)
  38. }
  39. }
  40. /// font_15
  41. static var font_15: UIFont {
  42. get {
  43. return UIFont.systemFont(ofSize: 15)
  44. }
  45. }
  46. /// font_16
  47. static var font_16: UIFont {
  48. get {
  49. return UIFont.systemFont(ofSize: 16)
  50. }
  51. }
  52. /// font_18
  53. static var font_18: UIFont {
  54. get {
  55. return UIFont.systemFont(ofSize: 18)
  56. }
  57. }
  58. /// font_22
  59. static var font_22: UIFont {
  60. get {
  61. return UIFont.systemFont(ofSize: 22)
  62. }
  63. }
  64. /// font_20
  65. static var font_20: UIFont {
  66. get {
  67. return UIFont.systemFont(ofSize: 20)
  68. }
  69. }
  70. /// font_bold_smallSystem
  71. static var font_bold_smallSystem: UIFont {
  72. get {
  73. return UIFont.boldSystemFont(ofSize: UIFont.smallSystemFontSize)
  74. }
  75. }
  76. /// font_bold_14
  77. static var font_bold_14: UIFont {
  78. get {
  79. return UIFont.boldSystemFont(ofSize: 14)
  80. }
  81. }
  82. /// font_bold_16
  83. static var font_bold_16: UIFont {
  84. get {
  85. return UIFont.boldSystemFont(ofSize: 16)
  86. }
  87. }
  88. }