9. Notification and Rotation
Objective-C code is all about objects sending messages to other objects. This communication usually occurs between two objects — the sender and receiver. However, sometimes a bunch of objects are concerned with one object. They all want to know when this object does something interesting. But it’s just not feasible for that object to keep track of every interested object and send every one a message.
Instead, an object can post notifications about what it is doing to a centralized notification center. Interested objects can register to receive a message when a particular notification is posted or when a particular object posts. In this chapter, you will learn how to use a notification center to handle these notifications. ...
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