Observer
public struct Observer
A convinient observer class to add observers to NotificationCenter
-
The observer selector
Declaration
Swift
public let selector: Selector -
The notification name
Declaration
Swift
public let name: Notification.Name -
The optional object to pass
Declaration
Swift
public let object: Any? -
A convinient observer class to add observers to
NotificationCenterDeclaration
Swift
public init(selector: Selector, name: Notification.Name, object: Any? = nil)Parameters
selectorthe selector to pass to the notification
namethe notification name
objectobject of type
Any, default = nil
View on GitHub
Observer Structure Reference