<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On May 11, 2016, at 7:37 AM, Erica Sadun via swift-users <<a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On May 11, 2016, at 9:57 AM, Dennis Weissmann <<a href="mailto:dennis@dennisweissmann.me" class="">dennis@dennisweissmann.me</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Huh! There’s a new overload for that initializer:<div class=""><br class=""></div><div class=""><span id="cid:7001B124-1CA5-4DD4-8A7D-3CB91776FAE9@Speedport_W_724V_01011603_00_008" class=""><Screen Shot 2016-05-11 at 3.52.34 PM.png></span></div><div class=""><br class=""></div><div class="">The one that takes CGFloats is the one that was there before, but the one taking Floats is new!</div><div class=""><br class=""></div><div class="">You can work around like this:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span><span style="font-variant-ligatures: no-common-ligatures" class=""> color = UIColor(red: CGFloat(</span><span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">0.892</span><span style="font-variant-ligatures: no-common-ligatures" class="">), green: CGFloat(</span><span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">0.609</span><span style="font-variant-ligatures: no-common-ligatures" class="">), blue: CGFloat(</span><span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">0.048</span><span style="font-variant-ligatures: no-common-ligatures" class="">), alpha: CGFloat(</span><span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">1.000</span><span style="font-variant-ligatures: no-common-ligatures" class="">))</span></div></div><div class="">or</div><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span><span style="font-variant-ligatures: no-common-ligatures" class=""> color = </span><span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">UIColor</span><span style="font-variant-ligatures: no-common-ligatures" class="">(red: </span><span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">Float</span><span style="font-variant-ligatures: no-common-ligatures" class="">(</span><span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">0.892</span><span style="font-variant-ligatures: no-common-ligatures" class="">), green: </span><span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">Float</span><span style="font-variant-ligatures: no-common-ligatures" class="">(</span><span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">0.609</span><span style="font-variant-ligatures: no-common-ligatures" class="">), blue: </span><span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">Float</span><span style="font-variant-ligatures: no-common-ligatures" class="">(</span><span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">0.048</span><span style="font-variant-ligatures: no-common-ligatures" class="">), alpha: </span><span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">Float</span><span style="font-variant-ligatures: no-common-ligatures" class="">(</span><span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">1.000</span><span style="font-variant-ligatures: no-common-ligatures" class="">))</span></div><div class=""><br class=""></div><div class="">
<div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">- Dennis</div></div>
</div>
</div></div></div></blockquote></div></div></div></div></blockquote></div><br class=""><div class=""><br class=""></div><div class="">Wow, that's a ridiculous situation to have. Who uses Float with iOS/tvOS anyway? </div><div class=""><br class=""></div><div class="">I created a workaround, but I hate it:</div></div></div></blockquote><br class=""></div><div>This is a known regression that is a fallout of the changes to playground literals, it is high priority to get fixed.</div><div><br class=""></div><div>-Chris</div><br class=""></body></html>