Class

UITableViewRowAction

A single action to present when the user swipes horizontally in a table row.

Declaration

@interface UITableViewRowAction : NSObject

Overview

Create a UITableViewRowAction object to define a single, custom action for a table row. Users swipe horizontally in a table view to reveal the actions associated with a row. Each row-action object contains the text display, the action to perform, and any specific formatting to apply to that action.

To add custom actions to your table view’s rows, implement the tableView:editActionsForRowAtIndexPath: method in your table view’s delegate object. In that method, create and return the actions for the indicated row. The table displays your action buttons and executes the appropriate handler block when the user taps one of them.

Topics

Creating a Table Row Action

+ rowActionWithStyle:title:handler:

Creates and returns a new table view row action object.

Configuring the Action’s Appearance

style

The style applied to the action button.

UITableViewRowActionStyle

Constants that specify the appearance of action buttons.

title

The title of the action button.

backgroundColor

The background color of the action button.

backgroundEffect

The visual effect to apply to the button.

Relationships

Inherits From

Conforms To

See Also

Row Actions

UISwipeActionsConfiguration

The set of actions to perform when swiping on rows of a table.

UIContextualAction

An action to display when the user swipes a table row.