Skip to content

Instantly share code, notes, and snippets.

@JeffLutzenberger
Created June 9, 2012 00:13
Show Gist options
  • Save JeffLutzenberger/2898777 to your computer and use it in GitHub Desktop.
Save JeffLutzenberger/2898777 to your computer and use it in GitHub Desktop.
Simple iOS Notification
// notify
[[NSNotificationCenter defaultCenter] postNotificationName:@"YourNotifyMessage" object:self];
// observer
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(observerFunction:)
name:@"YourNotifyMessage" object:nil];
// observer function
- (void)observerFunction:(NSNotification *)notice {
NSLog(@"Received a message");
}
@awrowse
Copy link

awrowse commented Jun 21, 2012

Your Mom is a notification message

@JeffLutzenberger
Copy link
Author

JeffLutzenberger commented Jun 24, 2012 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment