Reputation: 1506
Suppose I have a cocoa application with just a window and nothing in it. But if the user drags and drops a file into this window, the file will automatically be copied to a particular directory. How do I implement such a drag-and-drop functionality?
Upvotes: 0
Views: 346
Reputation: 61228
Three seconds invested in searching "cocoa drag and drop" produces the Drag and Drop Programming Topics for Cocoa. You want the "Dragging Destinations" section (since you're responding to a file dragged to your window. Read the documentation and try to follow along. If you get stuck, post a specific question with the code you used and the problem you encountered.
Upvotes: 1