Skip to content

Instantly share code, notes, and snippets.

@paulofierro
Last active April 6, 2023 15:41
Show Gist options
  • Save paulofierro/ffeb8bc7686a2f925550 to your computer and use it in GitHub Desktop.
Save paulofierro/ffeb8bc7686a2f925550 to your computer and use it in GitHub Desktop.
Listen for all NSNotifications
[[NSNotificationCenter defaultCenter] addObserverForName:nil
object:nil
queue:nil
usingBlock:^(NSNotification* notification) {
NSLog(@"Notification:\n"\
"name: %@\n"\
"object: %@\n"\
"userInfo: %@",
notification.name,
notification.object,
notification.userInfo);
}];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment