8 Protocols, Extensions, and Error Handling

Join our book community on Discord

https://packt.link/ios-Swift

In the previous chapter, you learned how to represent complex objects using classes or structures and how to use enumerations to group related values together.

In this chapter, you'll learn about protocols, extensions, and error handling. Protocols define a blueprint of methods, properties, and other requirements that can be adopted by a class, structure, or enumeration. Extensions enable you to provide new functionality for an existing class, structure, or enumeration. Error handling covers how to respond to and recover from errors ...

Get iOS 18 Programming for Beginners - Ninth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.