public extension NotificationCenter
SwifterSwift: Adds a one-time entry to the notification center’s dispatch table that includes a notification queue and a block to add to the queue, and an optional notification name and sender.
func observeOnce(forName name: NSNotification.Name?, object obj: Any? = nil, queue: OperationQueue? = nil, using block: @escaping (_ notification: Notification) -> Void)
The name of the notification for which to register the observer; that is, only notifications with this name are used to add the block to the operation queue.
The object whose notifications the observer wants to receive; that is, only notifications sent by this sender are delivered to the observer.
The operation queue to which block should be added.
The block to be executed when the notification is received.