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
NotificationCenter
Declaration
Swift
public init(selector: Selector, name: Notification.Name, object: Any? = nil)
Parameters
selector
the selector to pass to the notification
name
the notification name
object
object of type
Any
, default = nil