Worker
Worker

Reputation: 2409

How to create a menu when a user right-clicks on the dock-icon of cocoa app on Mac?

How to create a menu when a user right-clicks on the dock-icon of cocoa app on Mac?

Thank you very much in advance!

Max

Upvotes: 10

Views: 1296

Answers (2)

paulmelnikow
paulmelnikow

Reputation: 17208

Or, in MainMenu.xib, create an NSMenu instance and connect it to your NSApplication's dockMenu outlet.

Upvotes: 2

Alex
Alex

Reputation: 26859

Implement applicationDockMenu: in your app delegate to return the menu you want to use.

Upvotes: 15

Related Questions