2

I want to implement same notification feature in my app just like in-built Mail application of iOS devices?

In Mail application single notification get removed out of many from notification center when user view it?

I have searched for same and got answer for removing all notifications by using

[UIApplication sharedApplication].applicationIconBadgeNumber = 0;

But I don't want to remove all at once, I want to implement it same as in-built Mail application. Can anybody help on this?

Mobile_Dev
  • 91
  • 6
  • 1
    Calling `[UIApplication sharedApplication].applicationIconBadgeNumber -= 1` when you want to decrease badges does not work ? – KIDdAe Jul 16 '14 at 13:50
  • take a look here http://stackoverflow.com/questions/4861131/updating-ios-badge-without-push-notifications – Nathan Hegedus Jul 16 '14 at 13:53
  • 1
    I know about the badge count decrement but I want to remove one by one notification from notification center. – Mobile_Dev Jul 17 '14 at 05:20

1 Answers1

0

Try this code,

[UIApplication sharedApplication].applicationIconBadgeNumber = MAX([UIApplication sharedApplication].applicationIconBadgeNumber - 1, 0);
JiteshW
  • 2,195
  • 4
  • 32
  • 61