user1724168
user1724168

Reputation:

Update Status of current location -iOS

How can I get this small thumbnail status on the right corner of the icon?

Fahreneit application as shown below

Upvotes: 0

Views: 138

Answers (3)

Ilanchezhian
Ilanchezhian

Reputation: 17478

Use application badge to set like that.

[[UIApplication sharedApplication] setApplicationIconBadgeNumber:68];

For more reference, see this

Also see UIApplication documentation

Upvotes: 0

Tim Vermeulen
Tim Vermeulen

Reputation: 12562

You can use the setApplicationIconBadgeNumber: method to set the badge to any number you want. This message should be sent to an instance of UIApplication. To get the current application, you simply call [UIApplication sharedApplication].

Your code would look like this:

int number = 25; //set this to any number you want

[[UIApplication sharedApplication] setApplicationIconBadgeNumber:number];

Or, you can obviously set it at once, without the extra variable, like this:

[[UIApplication sharedApplication] setApplicationIconBadgeNumber:25];

Upvotes: 1

Bot
Bot

Reputation: 11855

For the badge see

http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIApplication_Class/Reference/Reference.html#//apple_ref/occ/instp/UIApplication/applicationIconBadgeNumber or use

[[UIApplication sharedApplication] setApplicationIconBadgeNumber:68];

For the new icon, you can't this is done by apple when you download a new application and it hasn't been opened yet.

Upvotes: 0

Related Questions