I want to create a drag and drop zone (using an NSView) for ANY file in my cocoa app. How do I do it?
Read Drag and Drop Programming Topics for Cocoa. You want your custom view to be a "dragging destination". You'll need to understand the pasteboard and file path pasteboard types, how to subclass a view (a generic NSView for your own custom class, or an existing view like NSImageView) and add the appropriate dragging source methods.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With