fix assertion error

This commit is contained in:
John Rommel Estropia committed 2016-04-01 07:41:23 +09:00
1 parent 0c564add46
commit 88cac73b20
2 files changed
+4 -2

No files matched your search

@@ -36,14 +36,14 @@ internal final class NotificationObserver {
let object: AnyObject?
let observer: NSObjectProtocol
init(notificationName: String, object: AnyObject?, closure: (note: NSNotification) -> Void) {
init(notificationName: String, object: AnyObject?, queue: NSOperationQueue? = nil, closure: (note: NSNotification) -> Void) {
self.notificationName = notificationName
self.object = object
self.observer = NSNotificationCenter.defaultCenter().addObserverForName(
notificationName,
object: object,
queue: nil,
queue: queue,
usingBlock: closure
)
}