Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save diegoserranoa/88f80e24d2856d9ca5d337824cc40cc8 to your computer and use it in GitHub Desktop.
Save diegoserranoa/88f80e24d2856d9ca5d337824cc40cc8 to your computer and use it in GitHub Desktop.
Wootric Notifications
// subscribe to notification
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveTestNotification:) name:[Wootric surveyDidDisappearNotification] object:nil];
- (void) receiveTestNotification:(NSNotification *) notification
{
if ([[notification name] isEqualToString:[Wootric surveyWillAppearNotification]]){
NSLog (@"Survey will be presented!");
} else if ([[notification name] isEqualToString:[Wootric surveyWillDisappearNotification]]){
NSLog (@"Survey will disappear!");
} else if ([[notification name] isEqualToString:[Wootric surveyDidAppearNotification]]){
NSLog (@"Survey was presented!");
} else if ([[notification name] isEqualToString:[Wootric surveyDidDisappearNotification]]){
NSLog (@"Survey disappeared!");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment