Reputation: 1737
How do you implement the red number indicators (like the email count notification)?
Upvotes: 3
Views: 1404
Reputation: 10407
What you want is called a "badge".
[UIApplication sharedApplication].applicationIconBadgeNumber = 2;
EDIT: removed SetApplicationBadge
Upvotes: 0
Reputation: 10565
What you are looking for is the applicationIconBadgeNumber
property which is a property of UIApplication
.
To set the badge, from anywhere in your app, use:
UIApplication *application = [UIApplication sharedApplication];
application.applicationIconBadgeNumber = 1; // set to any integer
To remove the badge, set the property to 0.
Documentation on Apple Developer Website
Upvotes: 12