In previous versions of swift, you would get the colour white like this UIColor.whiteColor()
However, in Swift 3, you get the colour white without initi
Use a stored class property instead of a computed class property.
extension UIColor {
static let custom = UIColor(white: 0.5, alpha: 1)
}
--
NOTE: Old answer. Previously Objective C didn't allow for class properties, now it does.
Like others have said, it's a property.
If you're only using Swift (no Objective C), then you can use a regular class property instead of a computed property.
extension UIColor {
@nonobjc static let custom = UIColor(white: 0.5, alpha: 1)
}