April 2015
Intermediate to advanced
556 pages
17h 47m
English
Every running application has an instance of NSNotificationCenter, which functions much like a bulletin board. Objects register themselves as being interested in certain notifications (“Please write me if anyone finds a lost dog”). We call the registered object an observer. Other objects can then post notifications to the center (“I have found a lost dog”). That notification is subsequently forwarded to all objects that are registered as interested. We call the object that posted the notification a poster.
Many standard Cocoa classes post notifications: Windows send notifications that they have changed size. When the selection of a table view changes, the table view sends ...
Read now
Unlock full access