Skip to content

Instantly share code, notes, and snippets.

@jen2
Created May 7, 2017 20:31
Show Gist options
  • Save jen2/24c2f5814225cb772b5a9cc1c2629e2d to your computer and use it in GitHub Desktop.
Save jen2/24c2f5814225cb772b5a9cc1c2629e2d to your computer and use it in GitHub Desktop.
Removing the listener NSNotification in Objective-C for "Broadcasting with NSNotification Center."
[[NSNotificationCenter defaultCenter] removeObserver:someObserver];
//However to remove one particular notification from being observed it is best to use the following.
[[NSNotificationCenter defaultCenter] removeObserver:self name:notificationName object:nil];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment