Protocol

UITableViewDropCoordinator

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

Declaration

protocol UITableViewDropCoordinator

Overview

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.

Topics

Getting the Dragged Items

var items: [UITableViewDropItem]

The items being dragged.

Required.

Getting the Drop Location

var destinationIndexPath: IndexPath?

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

Required.

Animating Rows to Their Destination

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

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

Required.

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

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

Required.

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

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

Required.

Getting the Session Information

var session: UIDropSession

The drop session containing information about the transaction.

Required.

var proposal: UITableViewDropProposal

The proposal for how to incorporate the dropped items.

Required.

Relationships

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.