Manlio
Manlio

Reputation: 10865

Make downloads dock icon bounce programmatically

How can I make the dock Downloads icon bounce programmatically?
Notice that I don't want my app icon to bounce, but only Downloads' icon.

In particular, I'm downloading a file from my app to Downloads folder. No problem with this, but I want the Downloads icon to bounce when the download is finished (as happen when Safari completes a download).

Upvotes: 9

Views: 1374

Answers (1)

James Williams
James Williams

Reputation: 1891

A quick Google search turns up

[[NSDistributedNotificationCenter defaultCenter]
        postNotificationName:@"com.apple.DownloadFileFinished"
        object:pathToFile];

from http://iloveco.de/quick-trick-bouncing-the-downloads-stack/

I think the trick for knowing what to search for was knowing that the folders in the Dock have been called "Stacks" since 10.5.

Upvotes: 10

Related Questions