Which was fine until I added Alexandria. But now I get an error:
Ambiguous use of operator /
So ok... I change it: UIColor(red: 81, green: 45, blue: 109, alpha: 1) and now:
ambiguous use of init(red:green:blue:alpha:)
I guess this is an interesting case... we're overloading the function -- the NAME of the function is the same, but the argument types are not.
if I remove the explicit alpha argument, no problems....
And so, after some discussion, we agreed to just remove the alpha argument because it's a convenience initializer and we're using it for shortcuts/convenience. Most of the time you'll want a 1.0 alpha anyways so... this just makes it a little more convenient.
Originally I had code like this:
UIColor(red: 78/255, green: 43/255, blue: 96/255, alpha: 1)
Which was fine until I added Alexandria. But now I get an error:
So ok... I change it:
UIColor(red: 81, green: 45, blue: 109, alpha: 1)
and now:I guess this is an interesting case... we're overloading the function -- the NAME of the function is the same, but the argument types are not.
if I remove the explicit alpha argument, no problems....
And so, after some discussion, we agreed to just remove the
alpha
argument because it's a convenience initializer and we're using it for shortcuts/convenience. Most of the time you'll want a 1.0 alpha anyways so... this just makes it a little more convenient.