Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add observation to MAKVONotification #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add observation to MAKVONotification #17

wants to merge 1 commit into from

Conversation

naan
Copy link

@naan naan commented Jul 8, 2014

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)
      }
      })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant