Merge pull request #509 from tomburns/optional-notification-name

Make name parameter of rx_notification optional.
This commit is contained in:
Krunoslav Zaher 2016-02-27 17:26:35 +01:00
commit 2c81bcb1e7
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))