NotificationCenter
extension Reactive where Base: NotificationCenter
The reactive extension can be accessed through the reactive
instance property and the reactive
static property.
-
Returns a Signal to observe posting of the specified notification.
Note
The signal does not terminate naturally. Observers must be explicitly disposed to avoid leaks.
Declaration
Swift
public func notifications(forName name: Notification.Name?, object: AnyObject? = nil) -> Signal<Notification, NoError>
Parameters
name
name of the notification to observe
object
an instance which sends the notifications
Return Value
A Signal of notifications posted that match the given criteria.