Initializes a new notification.


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


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.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software