Function

CFNotificationCenterRemoveObserver

Stops an observer from receiving certain notifications.

Declaration

void CFNotificationCenterRemoveObserver(CFNotificationCenterRef center, const void *observer, CFNotificationName name, const void *object);

Parameters

center

The notification center to modify.

observer

The observer. This value must not be NULL.

name

The name of the notification to stop observing. If NULL, observer stops receiving callbacks for all notifications posted by object.

object

The object to stop observing. For distributed notifications, object must be a CFString object. If NULL, observer stops receiving callbacks for all objects posting notifications named name.

If center is a Darwin notification center, this value is ignored.

Discussion

If both name and object are NULL, this function unregisters observer from all the notifications for which it had previously registered with center.

See Also

Adding and Removing Observers

CFNotificationCenterAddObserver

Registers an observer to receive notifications.

CFNotificationCenterRemoveEveryObserver

Stops an observer from receiving any notifications from any object.