A notification dispatch mechanism that enables the broadcast of information to registered observers.
- iOS 2.0+
- macOS 10.0+
- tvOS 9.0+
- watchOS 2.0+
Objects register with a notification center to receive notifications (
NSNotification objects) using the
add methods. Each invocation of this method specifies a set of notifications. Therefore, objects may register as observers of different notification sets by calling these methods several times.
Each running Cocoa program has a default notification center. You typically don’t create your own. An
NSNotification object can deliver notifications only within a single program. If you want to post a notification to other processes or receive notifications from other processes, use an instance of