Created
June 9, 2012 00:13
-
-
Save JeffLutzenberger/2898777 to your computer and use it in GitHub Desktop.
Simple iOS Notification
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
// 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"); | |
} |
your mom
…On Thu, Jun 21, 2012 at 2:21 PM, Andy Rowse < ***@***.*** > wrote:
Your Mom is a notification message
---
Reply to this email directly or view it on GitHub:
https://gist.github.com/2898777
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Your Mom is a notification message