<!--
{
  "availability" : [
    "iOS: 5.0.0 - 13.0.0",
    "iPadOS: 5.0.0 - 13.0.0",
    "macCatalyst: 13.1.0 - 13.1.0",
    "tvOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UITableViewDelegate/tableView(_:performAction:forRowAt:withSender:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UITableViewDelegate(im)tableView:performAction:forRowAtIndexPath:withSender:"
  },
  "title" : "tableView(_:performAction:forRowAt:withSender:)"
}
-->

# tableView(_:performAction:forRowAt:withSender:)

Tells the delegate to perform a copy or paste operation on the content of a given row.

```
optional func tableView(_ tableView: UITableView, performAction action: Selector, forRowAt indexPath: IndexPath, withSender sender: Any?)
```

## Parameters

`tableView`

The table view that is making this request.

`action`

A selector type identifying the [`copy(_:)`](/documentation/UIKit/UIResponderStandardEditActions/copy(_:)) or [`paste(_:)`](/documentation/UIKit/UIResponderStandardEditActions/paste(_:)) method of the [`UIResponderStandardEditActions`](/documentation/UIKit/UIResponderStandardEditActions) informal protocol.

`indexPath`

The index path of the row.

`sender`

The object that initially sent the `copy:` or `paste:` message.

## Discussion

The table view invokes this method for a given `action` if the user taps Copy or Paste in the editing menu. The delegate can do whatever is appropriate for the action; for example, for a copy, it can extract the relevant cell content for the row at `indexPath` and write it to the general pasteboard or an application (private) pasteboard. See [`UIPasteboard`](/documentation/UIKit/UIPasteboard) for further information.

---

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)