Michael Long
Nov 29, 2020

--

Extensions are pretty cool, and I like the accessibility idea. That said, I'm a bit less fond of the nil coalescing operator blowing away any defaults that you didn't happen to set.

If you check out the following gist, I did a partial version of "ally" using a conditional modifier that only sets the values you actually pass into the function.

https://gist.github.com/hmlongco/5f8fa6fb62fa363c3a87c403dcf15eab

--

--

Michael Long
Michael Long

Written by Michael Long

I write about Apple, Swift, and SwiftUI in particular, and technology in general. I'm also a Lead iOS Engineer at InRhythm, a modern digital consulting firm.

No responses yet