Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dynamically updating app icon in OSX

When I was using Chrome to download something in Lion, a badge with downloading progress which dynamically updates itself is shown on my dock.

Dynamic badge

How may one go about achieving that?

like image 580
Will Avatar asked Dec 17 '11 12:12

Will


People also ask

How do you update app icons on Mac?

After pulling up Finder > Applications, find the app you'd like to change the icon for. Right click and select Get Info or use the keyboard shortcut command + I. Now just drag the new image you want to use on top of the existing icon (you can also copy the new image then paste it onto the existing icon).

How do you change the icon of an app with the new update?

Long-press the app icon you want to change. Tap the pencil button to edit the shortcut. Tap the app icon. Select the icon pack from which you want to apply the icon.

How do I change shortcut icons when updating apps?

According to the video, all you have to do to change your app icons is head to the "Shortcuts" app preinstalled on your iPhone and select "Create New Shortcut." From there, you select the app you want to change the image for, and in a couple of clicks, it will have gotten a major glow-up.


1 Answers

I think you are looking for this piece of code:

[[[NSApplication sharedApplication] dockTile] setBadgeLabel:@"My String"];

Here you can find all the information you need (it's the NSDockTile Class Reference).

like image 128
Sylter Avatar answered Oct 02 '22 11:10

Sylter