Instance Method


Adds a notification to the notification queue with a specified posting style, criteria for coalescing, and run loop mode.


- (void)enqueueNotification:(NSNotification *)notification postingStyle:(NSPostingStyle)postingStyle coalesceMask:(NSNotificationCoalescing)coalesceMask forModes:(NSArray<NSRunLoopMode> *)modes;



The notification to add to the queue.


The posting style for the notification. The posting style indicates when the notification queue should post the notification to its notification center.


A mask indicating what criteria to use when matching attributes of notification to attributes of notifications in the queue. The mask is created by combining any of the constants NSNotificationNoCoalescing, NSNotificationCoalescingOnName, and NSNotificationCoalescingOnSender.


The list of modes the notification may be posted in. The notification queue will only post the notification to its notification center if the run loop is in one of the modes provided in the array.

This parameter may be nil, in which case it defaults to NSDefaultRunLoopMode.

See Also

Managing Notifications

- enqueueNotification:postingStyle:

Adds a notification to the notification queue with a specified posting style.

- dequeueNotificationsMatching:coalesceMask:

Removes all notifications from the queue that match a provided notification using provided matching criteria.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software