Skip to content

Instantly share code, notes, and snippets.

@vin-the-dev
Created March 6, 2018 10:32
Show Gist options
  • Save vin-the-dev/dbe4c777c014a695520b979a7dcbce07 to your computer and use it in GitHub Desktop.
Save vin-the-dev/dbe4c777c014a695520b979a7dcbce07 to your computer and use it in GitHub Desktop.
The power of Color Sets in Xcode9
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