The Notification pattern enables communication between objects without tight coupling. An object is able to broadcast information to any number of other objects without any specific information about the other objects. An instance of Cocoa’s
NSNotification class encapsulates the information to be broadcast. Objects that are interested in receiving the information register themselves with an instance of Cocoa’s
NSNotificationCenter class. Registered objects are called observers, and the Notification pattern is sometimes called the “Observer” pattern in other frameworks. Registered observers specify the types of communication desired.
When a notification is sent to a notification center, the notification center distributes the ...