Any suggestions how this code works in iOS 9 with xcode 7?
color.getRed(&red, green: &green, blue: &blue, alpha: &alpha)
It says "Expected declaration"
Here is the code:
var red: CGFloat = 0.0
var green: CGFloat = 0.0
var blue: CGFloat = 0.0
var alpha: CGFloat = 0.0
color.getRed(&red, green: &green, blue: &blue, alpha: &alpha)
webLabel.text = String(format: "#%02X%02%02X", CInt(red*255),CInt(green*255),CInt(blue*255))
"color" is assigned previously like so:
var color: UIColor
{
return UIColor(hue: CGFloat(hue/360), saturation: CGFloat(saturation/100), brightness: CGFloat(brightness/100), alpha: 1.0)
}
I have just started with the xcode 7 and swift so I am rookie at this. Thanks in advance.