Skip to content

Instantly share code, notes, and snippets.

@jen2
Created May 7, 2017 20:29
Show Gist options
  • Save jen2/6b6535901f5c461292acb2b50d5b782d to your computer and use it in GitHub Desktop.
Save jen2/6b6535901f5c461292acb2b50d5b782d to your computer and use it in GitHub Desktop.
Pass userInfo with NSNotification in Objective-C for "Broadcasting with NSNotification Center."
NSDictionary* userInfoDictionary = @{@”name”: @”Bob Smith”};
[[NSNotificationCenter defaultCenter] postNotificationName:@”SomeActionIsComplete” object:nil userInfo:userInfoDictionary];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment