Skip to content

Instantly share code, notes, and snippets.

@andyyhope
Created May 25, 2016 09:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andyyhope/86081df3eface923793e58bd6dc9d15c to your computer and use it in GitHub Desktop.
Save andyyhope/86081df3eface923793e58bd6dc9d15c to your computer and use it in GitHub Desktop.
static func addObserver(observer: AnyObject, selector: Selector, notification: Notification) {
let name = nameFor(notification)
NSNotificationCenter.defaultCenter()
.addObserver(observer, selector: selector, name: name, object: nil)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment