iOS remove notification from notification center
13,753
Set the applicationIconBadgeNumber
property of your UIApplication
instance to 0. That is,
[UIApplication sharedApplication].applicationIconBadgeNumber = 0;
Edit: In the current iOS SDK, you can't remove just a single notification from the Notification Center programatically.
Author by
mysho
Updated on June 04, 2022Comments
-
mysho almost 2 years
Possible Duplicate:
iOS application: how to clear notifications?is there a way how to remove notification from notification center(iOS 5) when I click it and start my application ? Thanks a lot
-
mysho about 12 yearsThis only remove number from app icon for me, but not clear notification center ... what is wrong ?
-
Praveen-K about 12 yearsIts a local notification or remote notification?
-
Adam Wright about 12 yearsAfter a bit of searching, I've found a dupe which is a much better answer than this. Have a look at my comment on your answer.
-
mysho about 12 yearsYes this is great, thanks a lot, but this solution clear all notifications from notification center and I want clear only notification which I click ...
-
Gruntcakes over 11 yearsHow come this is marked as the correct answer when you wanted to delete one notification and the answer deletes all of them? Did you find a way to delete only one notification?
-
Ganesh G over 11 yearsHi, Am also having same problem. Is there any way to delete selected notification from the notification center?
-
Adam Wright over 11 yearsThere's no supported way to remove exactly one notification. Stupid limit, but there we go.
-
Roger C S Wernersson over 11 yearsI had to add [[UIApplication sharedApplication] cancelAllLocalNotifications]; to get it to work.
-
Mitchel Kelonye over 9 yearsHow do applications like Skype, Yo solve this problem?