From 7cb5a3b79ab675ab9a9d5059bf99a6e2b8af9a37 Mon Sep 17 00:00:00 2001 From: Tom Burns Date: Wed, 24 Feb 2016 20:47:13 -0600 Subject: [PATCH] Make name parameter of rx_notification optional. --- RxCocoa/Common/Observables/NSNotificationCenter+Rx.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RxCocoa/Common/Observables/NSNotificationCenter+Rx.swift b/RxCocoa/Common/Observables/NSNotificationCenter+Rx.swift index 0f912e36..a9ad4517 100644 --- a/RxCocoa/Common/Observables/NSNotificationCenter+Rx.swift +++ b/RxCocoa/Common/Observables/NSNotificationCenter+Rx.swift @@ -20,7 +20,7 @@ extension NSNotificationCenter { - returns: Observable sequence of posted notifications. */ @warn_unused_result(message="http://git.io/rxs.uo") - public func rx_notification(name: String, object: AnyObject? = nil) -> Observable { + public func rx_notification(name: String?, object: AnyObject? = nil) -> Observable { return Observable.create { [weak object] observer in let nsObserver = self.addObserverForName(name, object: object, queue: nil) { notification in observer.on(.Next(notification))