Last active
October 16, 2019 04:42
-
-
Save artembolotov/504db88ba2b99b6d3dcfa3bb3447dc48 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override func draw(_ rect: CGRect) { | |
StyleKit.drawCheckBox(frame: rect, mainColor: .main, isChecked: isChecked) | |
} | |
extension UIColor { | |
static var main: UIColor { | |
if #available(iOS 13.0, *) { | |
return UIColor { (traitCollection) -> UIColor in | |
if traitCollection.userInterfaceStyle == .dark { | |
return StyleKit.appMainColorDark | |
} | |
return StyleKit.appMainColorLight | |
} | |
} | |
return StyleKit.appMainColorLight | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment