Mobile Development

Notification

A notification is simply a broadcast of information. Similar to the way television works, a station can broadcast a television signal and you can see this broadcast by tuning your television to a particular channel. The television station doesn't know about your particular TV. The receiver, you in this example, chooses to receive that signal by tunning your TV.

Notifications in iOS can be handled by the UINotificationCenter. Notifications differ from delegates in that they are not a one-to-one connection point. Instead, they are a broadcast which objects can subscribe to.

An Example

Below is the output of some code (listed below this image) of a Notification being broadcast within an application.

Code and process an be found here: http://www.andrewcbancroft.com/2014/10/08/fundamentals-of-nsnotificationcenter-in-swift/

References

[1] UINotificationCenter - https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSNotificationCenter_Class/index.html

[2] Cocoa Core Competencies - Notification https://developer.apple.com/library/ios/documentation/General/Conceptual/DevPedia-CocoaCore/Notification.html

[3] NSNotification - NSHipster - http://nshipster.com/nsnotification-and-nsnotificationcenter/