Protocols, Extensions, and Error Handling

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 to existing types, and handle error conditions in your apps gracefully.

The following topics will be covered:

  • Understanding protocols
  • Understanding extensions
  • Exploring error handling
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.148.102.166