Iterating Through Enum Cases With CaseIterable In Swift

Treat enum cases as if they were collections with a single move.

Gabriel Theodoropoulos

--

Photo by Lopsan: https://www.pexels.com/photo/makin-magic-album-sleeve-2191013/

Enums are a vital programming tool in Swift, as they allow to define types that enumerate related values and therefore write code that’s safe and specific. As we all know, enum cases can be either simple, or with associated values that store additional data tied…

--

--

Gabriel Theodoropoulos

An iOS & macOS app maker writing code in Swift. Author of countless programming tutorials. Content creator. https://serialcoder.dev