Chapter 17. Delegation Pattern

The delegation pattern is an alternative to inheritance that allows an object's behavior to be customized or overridden without subclassing. The delegation pattern is enthusiastically embraced in Objective-C. Understanding the role of delegate objects in the Cocoa framework is crucial to effective use of the frameworks, especially the application and user interface classes. This chapter will explain the delegation pattern, the role and use of delegate objects, how to define your own delegates, and how to incorporate the delegation pattern in your own designs.

Understanding Delegates

The delegation pattern externalizes, or delegates, selected decisions or actions to another object, termed the delegate object. It embodies ...

Get Learn Objective-C for Java Developers 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.