[swift-users] Initializing a UIColor

Charles Lane clane_47 at bellsouth.net
Wed May 11 08:46:04 CDT 2016


The following code worked fine in previous development snapshots but fails in the May 9, 2016 snapshot:

	let color = UIColor(red: 0.892, green: 0.609, blue: 0.048,  alpha: 1.000)

Does anyone know whether this is a bug or if the syntax changed? (Yes, I imported UIKit). Xcode gives an error of ‘Ambiguous use of init(red:green:blue:alpha:)’




More information about the swift-users mailing list