Set App badgeNumber to 0 without clearing the Notifications from notification center

[UIApplication sharedApplication].applicationIconBadgeNumber = 0; -- Setting the Badge number to 0 is clearing all the notifications inside the notification center. Is this the expected Bevaiour?



[UIApplication sharedApplication].applicationIconBadgeNumber = -1 ; -- This seems to set the badge number to 0 without clearing any notifications inside the notification center. Is this the expetced beviour and if there is anymore functionality to this. Also is there any Apple Developer documentation on setting badge number to -1.

Replies

Setting to 0 will -hide- the badge number, not clear it.


See applicationIconBadgeNumber