Class

UIContextualAction

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

Declaration

@interface UIContextualAction : NSObject

Overview

Create UIContextualAction objects to define the types of actions that can be performed when the user swipes left or right on a table row. Use your actions to initialize a UISwipeActionsConfiguration object in your table view delegate object.

Topics

Creating the Contextual Action

+ contextualActionWithStyle:title:handler:

Creates a new contextual action with the specified title and handler.

Configuring the Appearance

title

The title displayed on the action button.

backgroundColor

The background color of the action button.

image

The image to display in the action button.

Getting the Configuration Details

handler

The handler block to execute when the user selects the action.

UIContextualActionHandler

The handler block to call in response to the selection of an action

style

The style that is applied to the action button.

UIContextualActionStyle

Constants indicating the style information that is applied to the action button.

Relationships

Inherits From

See Also

Row Actions

UISwipeActionsConfiguration

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

UITableViewRowAction

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

Deprecated

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software