<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UITableViewDragDelegate/tableView(_:itemsForBeginning:at:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UITableViewDragDelegate(im)tableView:itemsForBeginningDragSession:atIndexPath:"
  },
  "title" : "tableView(_:itemsForBeginning:at:)"
}
-->

# tableView(_:itemsForBeginning:at:)

Provides the initial set of items (if any) to drag.

```
func tableView(_ tableView: UITableView, itemsForBeginning session: any UIDragSession, at indexPath: IndexPath) -> [UIDragItem]
```

## Parameters

`tableView`

The table view from which the drag operation originated.

`session`

The drag session object providing context for the drag operation.

`indexPath`

The index path of the row being dragged.

## Return Value

An array of [`UIDragItem`](/documentation/UIKit/UIDragItem) objects representing the contents of the specified row. Return an empty array if you do not want the user to drag the specified row.

## Discussion

You must implement this method to allow the dragging of rows from your table view. In your implementation, use the specified `indexPath` to identify which row is being dragged. In response, create one or more [`UIDragItem`](/documentation/UIKit/UIDragItem) objects representing the content for that row. Normally, you return only one drag item, but you may return more than one item if the specified row represents a container for other content. Return an empty array to indicate that you don’t want the specified row to be dragged.

The table view calls this method one or more times when a new drag begins within its bounds. Specifically, it calls the method once for each row that’s part of the initial drag. For example, if three rows were selected when the user began the drag operation, the table view calls this method three times. If the user begins a drag operation from an unselected row, this method is called only once for that row.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)