Merge pull request #509 from tomburns/optional-notification-name
Make name parameter of rx_notification optional.
This commit is contained in:
commit
2c81bcb1e7
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Reference in New Issue