Instance Property

name

The name of the notification.

Declaration

var name: NSNotification.Name { get }

Discussion

Typically you use this property to find out what kind of notification you are dealing with when you receive a notification.

Special Considerations

Notification names can be any string. To avoid name collisions, you might want to use a prefix that’s specific to your application.

See Also

Getting Notification Information

var object: Any?

The object associated with the notification.

var userInfo: [AnyHashable : Any]?

The user information dictionary associated with the notification.