Skip to content

Instantly share code, notes, and snippets.

@chauvincent
Last active May 14, 2019 05:45
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 chauvincent/a35a8f08c7dd4fc183ab2bd5b2ba5e6d to your computer and use it in GitHub Desktop.
Save chauvincent/a35a8f08c7dd4fc183ab2bd5b2ba5e6d to your computer and use it in GitHub Desktop.
NotificationCenter.default.addObserver(
forName: .SomethingToObserveNotification,
object: nil,
queue: .main) { [weak self] notification in
self?.handleNotification(notification)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment