The interface for initiating drags from a table view.


protocol UITableViewDragDelegate


Implement this protocol in the object that you use to initiate drags from your table view. The only required method of this protocol is the tableView(_:itemsForBeginning:at:) method, but you can implement other methods as needed to customize the drag behavior of your table view.

Assign your custom delegate object to the dragDelegate property of your table view.


Providing the Items to Drag

Tracking the Drag Session

func tableView(UITableView, dragSessionWillBegin: UIDragSession)

Signals the start of a drag operation involving content from the specified table view.

func tableView(UITableView, dragSessionDidEnd: UIDragSession)

Signals the end of a drag operation involving content from the specified table view

Providing a Custom Preview

func tableView(UITableView, dragPreviewParametersForRowAt: IndexPath) -> UIDragPreviewParameters?

Returns custom information about how to display the row at the specified location during the drag.


Inherits From

See Also

Drag and Drop

Supporting Drag and Drop in Table Views

Initiate drags and handle drops from a table view.

protocol UITableViewDropDelegate

The interface for handling drops in a table view.

protocol UITableViewDropCoordinator

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

class UITableViewDropProposal

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

protocol UITableViewDropItem

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

protocol UITableViewDropPlaceholderContext

An object that you insert temporarily into the table view while waiting to receive the actual data that you plan to display.

protocol UIDataSourceTranslating

An advanced interface for managing a data source object.