I am making the application that has needs to set the notification , thankfully i was able to set the local notification but i dont know how to delete the notification which is set by this application(my aplicaton ).The xcode does provide functionality of delete with removeAllNotifications but you cannot remove the selected notifications set by the application . If somebody can guide .....thanks a lot
+3
A:
[[UIApplication sharedApplication] cancelLocalNotification:notification]
Paulo Casaretto
2010-07-30 14:41:53
+1
A:
You asked this question twice, so I'm answering on both questions in the hopes of it reaching you:
Cancel all local notifications with this code:
[[UIApplication sharedApplication] cancelAllLocalNotifications];
(you actually just need the middle line.
Cancel one local notification with this line of code:
[[UIApplication sharedApplication] cancelLocalNotification:theNotification];
where theNotification
is a UILocalNotification
object, so in order to cancel a specific notification you need to hold on to it's UILocalNotification
.
You can find more stuff in apple's documentation: http://developer.apple.com/iphone/library/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/IPhoneOSClientImp/IPhoneOSClientImp.html
winsmith
2010-08-07 08:26:47
+1
A:
You can cancel notification by following function:[[UIApplication sharedApplication]cancelNotification:object Of your UILocalNotification]
Apoorv
2010-10-15 09:14:35