Class

NSTableViewRowAction

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

Declaration

@interface NSTableViewRowAction : NSObject

Overview

In an editable table, performing a horizontal swipe on a row reveals a button to delete the row by default. This class lets you define one or more custom actions to display for a given row in your table. Each instance of this class represents a single action to perform and includes the text, formatting information, and behavior for the corresponding button.

To add custom actions to your table view’s rows, implement the tableView:rowActionsForRow:edge: method in your table view’s delegate object. In that method, create and return an array of actions for the specified row. The table handles the remaining work of displaying the action buttons and executing the appropriate handler block when the user clicks the button.

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.

title

The title of the action button.

backgroundColor

The background color of the action button.

Constants

NSTableViewRowActionStyle

Constants that help define the appearance and behavior of action buttons.

Instance Properties

Relationships

Inherits From

Conforms To

See Also

Rows and Columns

NSTableHeaderView

An object that draws headers over a table view's columns and handles mouse events in those headers.

NSTableHeaderCell

An object that a table header view uses to draw the content of the column headers.

NSTableRowView

The view shown for a row in a table view.

NSTableColumn

The display characteristics and identifier for a column in a table view.