Created
May 7, 2017 20:31
-
-
Save jen2/24c2f5814225cb772b5a9cc1c2629e2d to your computer and use it in GitHub Desktop.
Removing the listener NSNotification in Objective-C for "Broadcasting with NSNotification Center."
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[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