Advanced and Practical Enum usage in Swift

Advanced Enum Usage

released Fri, 01 Mar 2019
Swift Version 5.0

Advanced Enum Usage

The enum type is one of Swift's most distinctive features. We already saw a lot of different use cases. However, There's much more that enums can do.

They can be used with protocols, just like other Swift types, they can have extensions, they can be generic, and much more. This chapter will introduce these interesting enum features.

We will start by having a look at conforming enums to protocols.