This commit is contained in:
John Rommel Estropia
2016-07-21 02:45:42 +09:00
parent 267c21063a
commit a638620858
85 changed files with 1621 additions and 1819 deletions

View File

@@ -32,16 +32,16 @@ internal final class NotificationObserver {
// MARK: Public
let notificationName: String
let notificationName: Notification.Name
let object: AnyObject?
let observer: NSObjectProtocol
init(notificationName: String, object: AnyObject?, queue: OperationQueue? = nil, closure: (note: Notification) -> Void) {
init(notificationName: Notification.Name, object: AnyObject?, queue: OperationQueue? = nil, closure: (note: Notification) -> Void) {
self.notificationName = notificationName
self.object = object
self.observer = NotificationCenter.default.addObserver(
forName: NSNotification.Name(rawValue: notificationName),
forName: notificationName,
object: object,
queue: queue,
using: closure
@@ -52,7 +52,7 @@ internal final class NotificationObserver {
NotificationCenter.default.removeObserver(
self.observer,
name: NSNotification.Name(rawValue: self.notificationName),
name: self.notificationName,
object: self.object
)
}