Instance Method


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?)



The table-view object that is making this request.


A selector type identifying the copy(_:) or paste(_:) method of the UIResponderStandardEditActions informal protocol.


An index-path object locating the row in its section.


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


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 for further information.

See Also

Responding to Row Actions

func tableView(UITableView, shouldShowMenuForRowAt: IndexPath) -> Bool

Asks the delegate if the editing menu should be shown for a certain row.

func tableView(UITableView, canPerformAction: Selector, forRowAt: IndexPath, withSender: Any?) -> Bool

Asks the delegate if the editing menu should omit the Copy or Paste command for a given row.

func tableView(UITableView, editActionsForRowAt: IndexPath) -> [UITableViewRowAction]?

Asks the delegate for the actions to display in response to a swipe in the specified row.