Initializerswift 6.0.3Foundation
init(name:object:userInfo:)
Initialize a new Notification
.
init(name: Notification.Name, object: Any? = nil, userInfo: [AnyHashable : Any]? = nil)
The default value for userInfo
is nil.
Initialize a new Notification
.
init(name: Notification.Name, object: Any? = nil, userInfo: [AnyHashable : Any]? = nil)
s10Foundation12NotificationV4name6object8userInfoAcA14NSNotificationC4NameV_ypSgSDys11AnyHashableVypGSgtcfc
What are these?9XOL1
The default value for userInfo
is nil.
import Foundation
struct Notification
Notification
encapsulates information broadcast to observers via a NotificationCenter
.
typealias Name = NSNotification.Name
@frozen struct AnyHashable
A type-erased hashable value.
var customMirror: Mirror { get }
var debugDescription: String { get }
var description: String { get }
var name: Notification.Name
A tag identifying the notification.
var object: Any?
An object that the poster wishes to send to observers.
var userInfo: [AnyHashable : Any]?
Storage for values or objects related to this notification.
static func == (lhs: Notification, rhs: Notification) -> Bool
func hash(into hasher: inout Hasher)
typealias ReferenceType = NSNotification