Creating Enums with Custom Raw Type in Swift
An additional way to use enums in Swift for smarter coding
5 min readFeb 11, 2022
--
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…