Closed Gatada closed 6 years ago
I like the idea. Something like:
extension UIColor {
/// Color #FFC034 (alpha 255)
static var myColor: UIColor {
return UIColor(named: "MyColor") ?? .clear
}
}
Accessing like:
UIColor.myColor
I will implement it 👍
Done on 0.5.1
I would prefer seeing the generated colours added as computed properties, as we are simply accessing a defined value of a particular type - and not doing any functional computation or state changing.