Michael Long
Dec 2, 2024

--

Color example isn't that great, as one should really be using color assets anyway, and Xcode now generates those enumerations for you, automatically.

And strictly speaking, you're not really using enumerations for any of your examples. None of the values are actually enumerated.

All you're effectively doing is using "enum" as a convenient, non-instantiable namespace.

There's value to that, to be sure. But it's not really an enumeration.

--

--

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