Type Property

defaultCenter

The app’s default notification center.

Declaration

@property(class, readonly, strong) NSNotificationCenter *defaultCenter;

Discussion

All system notifications sent to an app are posted to the defaultCenter notification center. You can also post your own notifications there.

If your app uses notifications extensively, you may want to create and post to your own notification centers rather than posting only to the defaultCenter notification center. When a notification is posted to a notification center, the notification center scans through the list of registered observers, which may slow down your app. By organizing notifications functionally around one or more notification centers, less work is done each time a notification is posted, which can improve performance throughout your app.

See Also