An article about implementing drag and drop in a native macOS application using Apple’s Cocoa framework with custom images for dragged items.

Image for post
Image for post

Outset

For this example, we would like to set up a view serving some items that can be selected, dragged, and moved to some destination with the mouse or trackpad. In a practical case, they can also be dropped somewhere through a drag operation, though this is not the primary goal of this example. The following graphic shows a simple collection view with one section header and selectable items within. …

About

August Freytag

Developer and concept designer, working on macOS applications, web applications, interactive experiences and entertainment products. More at: augustfreytag.com

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store