Created
May 7, 2017 20:27
-
-
Save jen2/0d0da21648d06285d5b9b98dccfeada6 to your computer and use it in GitHub Desktop.
Set up listener for 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] addObserverForName:@”SomeActionIsComplete” object:nil queue:nil usingBlock:^(NSNotification *note) | |
{ | |
NSLog(@”The action I was waiting for is complete!!!”); | |
[self dismissViewControllerAnimated:YES completion:nil]; | |
}]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment