In the last chapter, you've learned how to represent complex objects using classes or structures and how to use enumerations to create a set of related values.
To finish the section on Swift, you need to understand some concepts that are important in developing iOS applications. You'll begin by learning about protocols, which define a blueprint of methods, properties, and other requirements that can be adopted by a class, structure, or enumeration. Next, you'll learn about extensions, which provide new functionality for an existing class, structure, or enumeration. Finally, you'll learn error handling, which covers how to respond to or recover from errors in your program.
By the end of this chapter, you'll be able to write your own protocols to meet the requirements of your apps, use extensions to add new capabilities...