init(name:object:)
Creates an expectation that is fulfilled when an NSNotification is posted from the default notification center by a specific object.
Declaration
convenience init(name notificationName: NSNotification.Name, object: Any?)Parameters
- notificationName:
The notification name to watch for.
- object:
The object by which the notification must be posted.