Notifications

Notifications are a flexible mechanism that enables multiple objects to communicate with each other without tightly coupling the objects together. An object called a notification center is used to register objects that need to be notified under certain circumstances. The objects registered to receive notifications are called observers. When objects post notifications with the notification center, the notification center distributes the posted notifications to interested observers by sending Objective-C messages to them. The notifications design pattern is described in Chapter 6.

The observers know about the notification center, but don’t need to know anything about the objects that post notifications. The objects that post notifications ...

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.