Chapter 8

Advanced Enum

Welcome to Chapter 7, Advanced Enum. The Swift Enumerations are often overlooked because developers tend to focus on classes and structs. The iOS platform, however, heavily deploys enums to design safe, accurate, and quick APIs. For example, when you with work UI Components such as AlertViewController, you are able to pick and choose the parameters instead of typing with your fingers. It’s all about enums. The primary focus of this chapter is to learn how to design practical and effortless methods and properties. In Lesson 1, you will learn the enum syntax along with three different kinds. In Lesson 2, you will learn how to apply enums to Storyboard and UIKIt. Afterwards, you will learn how to combine enums with generics, protocols, and error handling back in the days when Swift was nice and fresh. When you complete this chapter, you will come out programming in a different playing league.