publisher(for:object:)
Returns a publisher that emits events when broadcasting notifications.
Declaration
func publisher(for name: Notification.Name, object: AnyObject? = nil) -> NotificationCenter.PublisherParameters
- name:
The name of the notification to publish.
- object:
The object posting the named notification. If
nil, the publisher emits elements for any object producing a notification with the given name.
Return Value
A Publisher that emits events when broadcasting notifications.