Drag and drop
Enable people to move or duplicate items by dragging them from one location to another.
Overview
Drag and drop offers people a convenient way to move content from one part of your app to another, or from one app to another, using an intuitive dragging gesture. Support this feature in your app by adding view modifiers to potential source and destination views within your app’s interface.
[Image]
In your modifiers, provide or accept types that conform to the Transferable protocol, or that inherit from the NSItemProvider class. When possible, prefer using transferable items.
For design guidance, see Drag and drop in the Human Interface Guidelines.
Topics
Essentials
Configuring drag and drop behavior
Moving items
Moving transferable items
Moving items using item providers
itemProvider(_:)onDrag(_:preview:)onDrag(_:)onDrop(of:isTargeted:perform:)onDrop(of:delegate:)DropDelegateDropProposalDropOperationDropInfo