Make name parameter of rx_notification optional.

This commit is contained in:
Tom Burns 2016-02-24 20:47:13 -06:00
parent cf06a20750
commit 7cb5a3b79a
1 changed files with 1 additions and 1 deletions

View File

@ -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<NSNotification> {
public func rx_notification(name: String?, object: AnyObject? = nil) -> Observable<NSNotification> {
return Observable.create { [weak object] observer in
let nsObserver = self.addObserverForName(name, object: object, queue: nil) { notification in
observer.on(.Next(notification))