Dynamically updating application icon in OSX

When I used Chrome to download something to Lion, an icon with downloadable progress is displayed on my dock, which is dynamically updated.

Dynamic badge

How can this be achieved?

+6
source share
1 answer

I think you are looking for this piece of code:

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

Here you can find all the necessary information (this is an NSDockTile Class Link ).

+5
source

Source: https://habr.com/ru/post/903974/


All Articles