Creating Enums with Custom Raw Type in Swift

An additional way to use enums in Swift for smarter coding

Gabriel Theodoropoulos

--

Photo by Dominika Roseclay from Pexels

As developers who write code for the Apple ecosystem in Swift, we use enums all the time in order to represent lists of values that are meaningful to our programs. Enums can contain simple cases, but quite often there are raw values matching to each case. As an example, see the following…

--

--

Gabriel Theodoropoulos

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