TypedNotificationCenter
public protocol TypedNotificationCenterA type that can post TypedNotifications and add notification observers.
- 
                  
                  Posts a TypedNotificationDeclarationSwift func post<T>(_ notification: T) where T : TypedNotificationParametersnotificationThe notification to post. 
- 
                  
                  Registers a block to be executed when a matching notification is posted. DeclarationSwift func addObserver<T>(forType type: T.Type, object obj: T.Object?, queue: OperationQueue?, using block: @escaping (T) -> Void) -> NotificationObservation where T : TypedNotificationParameterstypeThe type of notification to observe. objectAn object to filter notifications by. Only notifications whose object is objectwill be delivered to the observer. Passnilto receive notifications from all objects.queueAn OperationQueue to run blockon. Passnilto haveblockevaluated synchronously on the posting thread.blockA block to execute when a matching notification is posted. The block takes the matching notification as an argument. Return ValueA notification observation that manages the lifetime of the observer. When the observation is deallocated, the notification observer is removed. 
 View on GitHub
View on GitHub TypedNotificationCenter Protocol Reference
        TypedNotificationCenter Protocol Reference