Reputation: 8158
I have a standard menubar app (with a dropdown menu) and would like to add the ability for my users to drag files on top of my menubar icon (like this).
Do you know how that is accomplished?
I'm assuming my menubar app has to accept drag and drop. But the thing that really confuses me is how the popout view is animated so nicely.
Any pointers would be much appreciated!
Upvotes: 1
Views: 1309
Reputation: 27
It's simple you should make yours button. You need an nsview to make drag and drop and click action for opening menu by delegate class here is sample that could help and this link for nsview class reference.
Now you should set this view to status button:
NSStatusItem *_statusItem;
_statusItem = [[NSStatusBar systemStatusBar] statusItemWithLength:NSVariableStatusItemLength];
[_statusItem setView:_buttonview];
Upvotes: 1