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 ...

Get Cocoa® Programming 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.