Initializer

init(name:object:userInfo:)

Initializes a new notification.

Declaration

init(name: Notification.Name, object: Any? = nil, userInfo: [AnyHashable : Any]? = nil)

Discussion

The default value for userInfo is nil.

See Also

Creating a Notification

typealias Notification.Name

An alias for a type used to represent the name of a notification.

struct NSNotification.Name

The type used for the name of a notification.