NotificationObserver
public class NotificationObserver
Manager of a TypedNotification registration. When the instance is no longer being held, it will automatically unregister the internal observer from future notification events.
-
Create a new observer for the given typed notification
Declaration
Swift
public init<A>(notification: TypedNotification<A>, block aBlock: @escaping (A) -> Void)
-
Force the observer to forget its observation reference (something that happens automatically if/when the observer is no longer held by another object).
Declaration
Swift
public func forget()
-
Cleanup notification registration by removing our internal observer from notifications.
Declaration
Swift
deinit