Initializer

init(name:object:userInfo:)

Initializes a notification with a specified name, object, and user information.

Declaration

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

Parameters

aName

The name for the new notification. May not be nil.

object

The object for the new notification.

userInfo

The user information dictionary for the new notification. May be nil.

See Also

Creating Notifications

init?(coder: NSCoder)

Initializes a notification with the data from an unarchiver.

init(name: NSNotification.Name, object: Any?)

Returns a new notification object with a specified name and object.

struct NSNotification.Name

The type used for the name of a notification.