Support the direct manipulation of your app's content using drag and drop.
With very little programming on your part, custom-view objects can be dragged and dropped anywhere. Objects become part of this dragging mechanism by conforming to dragging protocols: Draggable objects conform to the
NSDragging protocol, and destination objects (that is, receivers of a drop) conform to the
NSDragging protocol. AppKit hides all the details of tracking the cursor and displaying the dragged image.
To learn how to use drag and drop for an image view, see Supporting Drag and Drop Through File Promises. To use drag and drop in a table view, see Supporting Table View Drag and Drop Through File Promises. For an example of drag and drop in a collection view, see Supporting Collection View Drag and Drop Through File Promises, and for an outline view: Navigating Hierarchical Data Using Outline and Split Views.