NSNotificationCenter
The NSNotificationCenter is the brains of the operation. It allows you to do three things: register observer objects, post notifications, and unregister observers.
Here are some commonly used methods implemented by NSNotificationCenter:
-
class func defaultCenter() -> NSNotificationCenter
-
Returns the notification center.
-
func addObserver(observer: AnyObject, selector aSelector: Selector, name aName: String?, object anObject: AnyObject?)
Get Cocoa Programming for OS X: The Big Nerd Ranch Guide 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.