Swift: Matching Enumeration values with Switch Statement

Enumeration values can be matched using Switch statement. In Swift, switch statement must be exhaustive (must cover all the cases mentioned in Enumeration).If we don’t need any cases to be covered we can specify a default case in Switch statement.

 

Leave a Reply