<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=""><div class="">I agree, however, I like your workaround better than all the extra parentheses and CGFloats!</div><div class=""><br class=""></div><div class=""><br class=""></div><br class=""><div><blockquote type="cite" class=""><div class="">On May 11, 2016, at 10:37 AM, Erica Sadun &lt;<a href="mailto:erica@ericasadun.com" class="">erica@ericasadun.com</a>&gt; 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 &lt;<a href="mailto:dennis@dennisweissmann.me" class="">dennis@dennisweissmann.me</a>&gt; 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="">&lt;Screen Shot 2016-05-11 at 3.52.34 PM.png&gt;</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="">),&nbsp; 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="">),&nbsp; 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. &nbsp;Who uses Float with iOS/tvOS anyway?&nbsp;</div><div class=""><br class=""></div><div class="">I created a workaround, but I hate it:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 18px; line-height: normal; font-family: Menlo; color: rgb(187, 44, 162);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">extension</span><span style="font-variant-ligatures: no-common-ligatures;" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">Double</span><span style="font-variant-ligatures: no-common-ligatures;" class=""> {</span></div><div style="margin: 0px; font-size: 18px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">var</span><span style="font-variant-ligatures: no-common-ligatures" class=""> cg: </span><span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">CGFloat</span><span style="font-variant-ligatures: no-common-ligatures" class=""> { </span><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">return</span><span style="font-variant-ligatures: no-common-ligatures" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">CGFloat</span><span style="font-variant-ligatures: no-common-ligatures" class="">(</span><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">self</span><span style="font-variant-ligatures: no-common-ligatures" class="">) }</span></div><div style="margin: 0px; font-size: 18px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">}</span></div><div style="margin: 0px; font-size: 18px; line-height: normal; font-family: Menlo; min-height: 21px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""></span><br class=""></div><div style="margin: 0px; font-size: 18px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">class</span><span style="font-variant-ligatures: no-common-ligatures" class=""> ViewController: </span><span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">UIViewController</span><span style="font-variant-ligatures: no-common-ligatures" class=""> {</span></div><div style="margin: 0px; font-size: 18px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">override</span><span style="font-variant-ligatures: no-common-ligatures" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">func</span><span style="font-variant-ligatures: no-common-ligatures" class=""> viewDidLoad() {</span></div><div style="margin: 0px; font-size: 18px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">super</span><span style="font-variant-ligatures: no-common-ligatures" class="">.</span><span style="font-variant-ligatures: no-common-ligatures; color: #3d1d81" class="">viewDidLoad</span><span style="font-variant-ligatures: no-common-ligatures" class="">()</span>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div style="margin: 0px; font-size: 18px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span><span style="font-variant-ligatures: no-common-ligatures" class=""> c = </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: #272ad8" class="">0.5</span><span style="font-variant-ligatures: no-common-ligatures" class="">.</span><span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">cg</span><span style="font-variant-ligatures: no-common-ligatures" class="">, green: </span><span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">0.5</span><span style="font-variant-ligatures: no-common-ligatures" class="">, blue: </span><span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">0.5</span><span style="font-variant-ligatures: no-common-ligatures" class="">, alpha: </span><span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">0.5</span><span style="font-variant-ligatures: no-common-ligatures" class="">)</span></div><div style="margin: 0px; font-size: 18px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp; &nbsp; }</span></div><div style="margin: 0px; font-size: 18px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">}</span></div><div style="margin: 0px; font-size: 18px; line-height: normal; font-family: Menlo; min-height: 21px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""></span><br class=""></div></div><div style="margin: 0px; font-size: 18px; line-height: normal; font-family: Menlo; min-height: 21px;" class="">-- E</div><div style="margin: 0px; font-size: 18px; line-height: normal; font-family: Menlo; min-height: 21px;" class=""><br class=""></div></div></div></blockquote></div><br class=""></body></html>