An interface for coordinating your custom drop-related actions with the table view.


protocol UITableViewDropCoordinator


You do not create instances of this class yourself. When a drop occurs in the table view, UIKit creates an instance of this class and passes it to your tableView(_:performDropWith:) method. Use the object to let the table view know how you want to animate the dropped items into position.


Getting the Dragged Items

var items: [UITableViewDropItem]

The items being dragged.


Getting the Drop Location

var destinationIndexPath: IndexPath?

The index path at which to insert the item into the table view.


Animating Rows to Their Destination

func drop(UIDragItem, toRowAt: IndexPath) -> UIDragAnimating

Animates the item to the specified index path in the table view.


func drop(UIDragItem, to: UIDragPreviewTarget) -> UIDragAnimating

Animates the item to an arbitrary location in your view hierarchy.


func drop(UIDragItem, to: UITableViewDropPlaceholder) -> UITableViewDropPlaceholderContext

Animates the item to the specified location and inserts a placeholder cell at that location.


Getting the Session Information

var session: UIDropSession

The drop session containing information about the transaction.


var proposal: UITableViewDropProposal

The proposal for how to incorporate the dropped items.



Inherits From

See Also

Drag and Drop

Supporting Drag and Drop in Table Views

Initiate drags and handle drops from a table view.

protocol UITableViewDragDelegate

The interface for initiating drags from a table view.

protocol UITableViewDropDelegate

The interface for handling drops in a table view.

protocol UITableViewDropItem

The data associated with an item being dropped into the table view.

class UITableViewDropProposal

Your proposed solution for handling a drop in a table view.