Summary
With the responder chain, the target/action and the Chain of Responsibility patterns have been tied together in Cocoa’s design. Several other examples of patterns being combined by Cocoa have been shown throughout this chapter. This type of interaction between the patterns is common. Because Cocoa consistently applies the patterns, you will probably find it easy to learn despite the huge size of the APIs. You will find that things tend to work the way you would expect when you are comfortable with the underlying patterns.
As you become more proficient, you’ll even be able to guess at method names without ever having read an object’s documentation. You will also find that if you try to use these same patterns as you write code, your objects ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access