Created
March 6, 2018 10:32
-
-
Save vin-the-dev/dbe4c777c014a695520b979a7dcbce07 to your computer and use it in GitHub Desktop.
The power of Color Sets in Xcode9
This file contains 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
enum AppColor:String { | |
case AppClearColor | |
case AppGrayColor | |
case AppWhiteColor | |
case PrimaryColor | |
case PrimaryColor1 | |
case PrimaryColor2 | |
case PrimaryColor3 | |
case SecondaryColor1 | |
case ThemeColor | |
} | |
extension AppColor { | |
var color: UIColor { | |
get { | |
return UIColor(named: self.rawValue)! | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment