Enumeration is another type where you can group items of related values and use them in a type safe way in your code. In C/Objective-C you only had enumerations of type integer. But in Swift, enumerations have gotten quite an overhaul. You can define enumeration of type String, Character, Int, or a floating type; these also include variants of the types such as Double, UInt, etc.
Enumerations in Swift are first-class citizens, similar to Classes and Structures. They can do the following:
The basic syntax is the keyword enum and is then followed by the name of the enumeration. Notice ...