3

there is the possibility of a LocalNotification on the iPhone to load on a date? My problem is that I create an event for the notification but i release the object after creation.

Or can I just create a new Object with the same data to delete my Notification?

sorry for my english...

mario
  • 33
  • 1
  • 3

1 Answers1

12

scheduledLocalNotifications will give you the list of all scheduled notifications and use

- (void)cancelLocalNotification:(UILocalNotification *)notification

or you can cancel them all using:

 [[UIApplication sharedApplication] cancelAllLocalNotifications];
visakh7
  • 26,380
  • 8
  • 55
  • 69
  • yes, but this doesn't retrieve the ones that were already delivered are currently active in the screen. Anyone knows the answer for that one? – Rafael Sanches Apr 28 '12 at 05:19
  • I'm trying to do the same thing Rafael, and it looks like it might not be possible. Apple might be trying to save users from the "confusion" it might cause to have notifications disappear without any action on the user's part. – elsurudo May 18 '12 at 11:54
  • when a local notification is cancelled or when it has been triggered, can it's id be reused – Yanki Twizzy Sep 25 '15 at 20:53