Class Extensions
摘要
Extensions provide a powerful way to add new functionalities to an existing class, structure, enumeration, or a protocol. Once added, the function is available as a natural extension to the added class or the object. Extension can be added to user-defined objects or to a system-defined class. In this chapter, we will learn how to add extension to a system-defined class, and in Chapter 5 dedicated to image manipulation, we will learn how to add extension to user-defined view controller.