UIFont+ExampleFonts.swift 523 B

123456789101112131415161718192021
  1. //
  2. // UIFont+ExampleFonts.swift
  3. // Segmentio
  4. //
  5. // Created by Dmitriy Demchenko
  6. // Copyright © 2016 Yalantis Mobile. All rights reserved.
  7. //
  8. import UIKit
  9. extension UIFont {
  10. class func exampleAvenirMedium(ofSize size: CGFloat) -> UIFont {
  11. return UIFont(name: "Avenir-Book", size: size) ?? UIFont.systemFont(ofSize: size)
  12. }
  13. class func exampleAvenirLight(ofSize size: CGFloat) -> UIFont {
  14. return UIFont(name: "Avenir-Light", size: size) ?? UIFont.systemFont(ofSize: size)
  15. }
  16. }