I've added an extension to UIColor for some colors that I use throughout my app. Here's an example:
extension UIColor {
func appLightGrayColor() -> UIColor {
return UIColor(red: 190.0/255.0, green: 190.0/255.0, blue: 190.0/255.0, alpha: 1.0)
}
func grayScaleColor(grayScale : CGFloat) -> UIColor {
return UIColor(red: grayScale/255.0, green: grayScale/255.0, blue: grayScale/255.0, alpha: 1.0)
}
}
However, when I try to call it, the only way that I've been able to compile without errors is this:
UINavigationBar.appearance().barTintColor = UIColor.appLightGrayColor(UIColor())()
Here's what I get with autocomplete:
What am I doing wrong?