Setting the application icon badge number

suggest change

Use the following piece of code to set the badge number from within your application (suppose someNumber has been declared before):


[UIApplication sharedApplication].applicationIconBadgeNumber = someNumber;


UIApplication.shared.applicationIconBadgeNumber = someNumber

In order to remove the badge completely, just set someNumber = 0.

Feedback about page:

Optional: your email if you want me to get back to you:

Table Of Contents