Advertisement
SwiftBin

Untitled

Jul 10th, 2020
1,307
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Swift 0.53 KB | None | 0 0
  1. extension UIColor {
  2.     static var globalTint: UIColor {
  3.         return UIColor { (traitCollection: UITraitCollection) -> UIColor in
  4.             if traitCollection.userInterfaceStyle == .light {
  5.                 return TintColorLightUI.tint
  6.             } else {
  7.                 return TintColorDarkUI.tint
  8.             }
  9.         }
  10.     }
  11. }
  12.  
  13. fileprivate enum TintColorLightUI {
  14.     static let tint = UIColor.init(hexString: "#5CBBF2")
  15. }
  16.  
  17. fileprivate enum TintColorDarkUI {
  18.     static let tint = UIColor.init(hexString: "#5CBBF2")
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement