Advertisement
Guest User

Untitled

a guest
Jul 3rd, 2015
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. NSLog(@"Called Notification");
  2. NSUserNotification *notification = [[NSUserNotification alloc] init];
  3. [notification setTitle:@"Hello World"];
  4. [notification setInformativeText:@"Hello world message"];
  5. [notification setDeliveryDate:
  6. [NSDate dateWithTimeInterval:20
  7. sinceDate:[NSDate date]]];
  8. [notification setSoundName:NSUserNotificationDefaultSoundName];
  9. NSUserNotificationCenter *center =
  10. [NSUserNotificationCenter defaultUserNotificationCenter];
  11. [center scheduleNotification:notification];
  12. NSLog(@"Finished");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement