Contents

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, from one app to another, or to reorder content 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 conform to NSItemProviderReading and/or NSItemProviderWriting. In Swift, 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

Reordering items

Describing preview formations

Configuring spring loading

See Also

Event handling