Q:

How to clear badge number while preserving notification center in iOS8

this question is asked in other several links like How to clear badge number while preserving notification center
My question is a little more specific.
I would like to clear the badge number when opening app but i want the notificaiton in the notification center to not be cleared.
The suggested answer in the link above is to set the badge number to -1:
[[UIApplication sharedApplication] setApplicationIconBadgeNumber:-1]

This works with iOS8? I'm trying without any success.
Thank you
Davide

A:

As the doc says, the notification will be gone from notification area when you assign your badge count to 0. <0 will also cause to same effect.

