Clear Application's badge Number

Impossible picture Impossible · Jul 31, 2013 · Viewed 12.3k times · Source

I have made local notification in iphone app. And set icon badge number.

All works good. But if i have two notification in tray and user clicks on clear button than notification deletes from tray.

But the badge number of icon remains same.

I want to set the badge number to zero.

Thanks.

Answer

Vishnu picture Vishnu · Jul 31, 2013

use this in application didfinshlaunchingwithoptions

        application.applicationIconBadgeNumber = 0;