The notification mechanism of Cocoa implements one-to-many broadcast of messages based on the Observer pattern. Objects in a program add themselves or other objects to a list of observers of one or more notifications, each of which is identified by a global string (the notification name). The object that wants to notify other objects - the observed object - creates a notification object and posts it to a notification centre. The notification centre determines the observers of a particular notification and sends the notification to them via a message. The methods invoked by the notification message must conform to a certain single-parameter signature. The parameter of the method is the notification object, which contains the notification name, the observed object, and a dictionary containing any supplemental information.Posting a notification is a synchronous procedure. The posting object doesn’t regain control until the notification centre has broadcast the notification to all observers. For asynchronous behaviour, you can put the notification in a notification queue; control returns immediately to the posting object and the notification centre broadcasts the notification when it reaches the top of the queue.Regular notifications - that is, those broadcast by the notification centre - are intraprocess only. If you want to broadcast notifications to other processes, you can use the distributed notification centre and its related API.
-
Objective C Step 1) //Add below code in AppDelegate.h @property (retain, nonatomic) UIWindow *window; @property (nonatomic,retain) UI...
-
The Application Kit is a framework containing all the objects you need to implement your graphical, event-driven user interface: windows, p...
-
NSURLConnection is deprecated in OS X 10.11 and iOS 9.0 Advantage: NSURLSession also provides support for background downloads, ...