错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Class Extensions

  • Shantanu Baruah,
  • Shaurya Baruah

摘要

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.