One Logo Pool Ball
Foundation · IOS API REFERENCE

NotificationCenter.Publisher

struct · iOS 13.0+ · SDK 27.1

struct Publisher

A publisher that emits elements when broadcasting notifications.

Members (4)

get · iOS 13.0+

name

TypeScript
get name(): NSNotification_Name
Swift declaration
let name: Notification.Name

The name of notifications published by this publisher.

init · iOS 13.0+

init

TypeScript
static init(center: NotificationCenter, name: NSNotification_Name, object?: (unknown) | null): NotificationCenter_Publisher
Swift declaration
init(center: NotificationCenter, name: Notification.Name, object: AnyObject? = nil)

Creates a publisher that emits events when broadcasting notifications. - Parameters: - center: The notification center to publish notifications for. - name: The name of the notification to publish. - object: The object posting the named notfication. If `nil`, the publisher emits elements for any object producing a notification with the given name.

get · iOS 13.0+

center

TypeScript
get center(): NotificationCenter
Swift declaration
let center: NotificationCenter

The notification center this publisher uses as a source.

get · iOS 13.0+

object

TypeScript
get object(): (unknown) | null
Swift declaration
let object: AnyObject?

The object posting the named notfication.

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

NotificationCenter.Publisher.receive(subscriber:)

This declaration needs Swift generic type arguments. (no canonical witness for S)

All Foundation types →