MAKVONotificationCenter
MAKVONotificationCenter copied to clipboard
Add observation to MAKVONotification
I added observation to MAKVONotification so that I can remove observation from a block like this:
course.addObserver(nil, keyPath:["progress", "contentDownloaded"], options:nil, block: {(note:MAKVONotification!) in
switch note.keyPath! {
case "progress":
println("progress \(course.progress)")
case "contentDownloaded":
note.observation.remove()
default:
println(note.keyPath)
}
})