Swift: How to extract associated values in enumeration?

Enumeration cases can have associated values belonging to different types. By using Switch statement we can extract the associated values for constants and variables declared as enum type.

 

 

Leave a Reply