Save 40% on books and eBooks + 70% on videos now through May 31*—use code PROGRAM. Shop now.
Broadcast events with notifications.
The NSNotification mechanism makes it very easy to send an event to any object that might want to handle it. Favour this over delegates or action methods when more than one object might want to handle an event. If other applications might need to react to the event then consider sending a distributed notification as well.
For more tips, and more detail about this tip, please see my new book,
Cocoa Programming Developer's Handbook,
available in print and electronic formats.
Take advantage of special member promotions, everyday discounts, quick access to saved content, and more! Join Today.