NotificationCenter
extension NotificationCenter
                - 
                  
                  
Adds an entry to the notification center’s dispatch table for a
CheetahNotificationthat includes the sender, a notification queue, and a block to add to the queue.This creates a
Notificationusing theCheetahNotification.name, passes it toaddObserver(forName:, object:, queue:, using:), and returning its result.Declaration
Swift
public func addObserver(for notification: CheetahNotification, object: Any?, queue: OperationQueue?, using: @escaping (_ notification: Notification) -> Void) -> NSObjectProtocolParameters
notificationThe notification.
objectThe object whose notifications the observer wants to receive; that is, only notifications sent by this sender are delivered to the observer. If you pass nil, the notification center doesn’t use a notification’s sender to decide whether to deliver it to the observer.
queueThe operation queue to which block should be added. If you pass nil, the block is run synchronously on the posting thread.
usingThe block to be executed when the notification is received. The block is copied by the notification center and (the copy) held until the observer registration is removed. The block takes one argument:
notificationThe notification.
Return Value
An opaque object to act as the observer.
 
        NotificationCenter Extension Reference