<div class="meta" robots="noindex">

</div>

Class

# iOSTableRowAction

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<div class="warning">

<div class="title">

Warning

</div>

This item was deprecated in version 2020r2. Please use `iOSMobileTableRowAction</api/ios/iosmobiletablerowaction>` as a replacement.

</div>

## Description

An <span class="title-ref">iOSTableRowAction</span> represents a single action that a user can take when swiping horizontally on an iOSTable row. Multiple actions may be added. As of iOS 8 an action is presented as a button near the trailing edge of the row. This class is used in conjunction with the iOSTable.ActionsForRow event.

## Properties

<div class="rst-class">

table-centered_columns_3_and_4

</div>

| Name                               | Type                                        | Read-Only | Shared |
|------------------------------------|---------------------------------------------|-----------|--------|
| `Handle<iostablerowaction.handle>` | `Ptr</api/data_types/additional_types/ptr>` | ✓         |        |
| `Style<iostablerowaction.style>`   | `Styles<iostablerowaction.styles>`          | ✓         |        |
| `Tag<iostablerowaction.tag>`       | `Auto</api/deprecated/auto>`                |           |        |
| `Title<iostablerowaction.title>`   | `Text</api/deprecated/text>`                |           |        |

## Methods

<div class="rst-class">

table-centered_column_4

</div>

| Name                                          | Parameters                                                                                                                                          | Returns | Shared |
|-----------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|---------|--------|
| `Constructor<iostablerowaction.constructor0>` | style As iOSTableRowAction, title As `String</api/data_types/string>`, `Optional</api/language/optional>` tag As `Variant</api/data_types/variant>` |         |        |

## Enumerations

<div id="iostablerowaction.styles">

<div class="rst-class">

forsearch

</div>

</div>

iOSTableRowAction.Styles

### Styles

A style describes the conceptual role of the action. Destructive, in this context, means actions like deleting a user's data. Normal represents other non-destructive actions. (Normal, Destructive)

| Enum        | Description                                                                                                                                                            |
|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Destructive | Apply a style that indicates that the action might change or delete data. This style changes the background to an appropriate value to reflect the destructive action. |
| Normal      | Apply a style that reflects standard non-destructive actions.                                                                                                          |

## Property descriptions

<div id="iostablerowaction.handle">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

iOSTableRowAction.Handle

**Handle** As `Ptr</api/data_types/additional_types/ptr>`

Used for creating Declares to the underlying UITableViewRowAction object.

This property is read-only.

<div id="iostablerowaction.style">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

iOSTableRowAction.Style

**Style** As `Styles<iostablerowaction.styles>`

A value from the Styles enum to indicate how the row action displays.

This property is read-only.

<div id="iostablerowaction.tag">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

iOSTableRowAction.Tag

**Tag** As `Auto</api/deprecated/auto>`

A value to associate with the action. This value will be passed into the `iOSTable<iostable.rowaction>` event and allows you to determine which action was selected. As an Auto, there are no limitations on the value you supply.

<div id="iostablerowaction.title">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

iOSTableRowAction.Title

**Title** As `Text</api/deprecated/text>`

The title of the button. This is displayed to the user and therefore should be localized.

## Method descriptions

<div id="iostablerowaction.constructor0">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

iOSTableRowAction.Constructor

**Constructor**(style As iOSTableRowAction, title As `String</api/data_types/string>`, `Optional</api/language/optional>` tag As `Variant</api/data_types/variant>`)

<div class="note">

<div class="title">

Note

</div>

`Constructors</api/language/constructor>` are special methods called when you create an object with the `New</api/language/new>` keyword and pass in the parameters above.

</div>

Create a new row action that can be returned in `iOSTable<iostable.actionsforrow>`.

Creates a single action to delete a row (code in in iOSTable.ActionsForRow event):

``` xojo
Var actions(0) As iOSTableRowAction
' Create the Delete button
actions(0) = New iOSTableRowAction(iOSTableRowAction.Styles.Destructive, "Delete", "Delete")
Return actions
```

## Notes

Row actions only work for tables that use `iOSMobileTableDataSourceEditing</api/ios/iosmobiletabledatasourceediting>` and where its `AllowRowEditing<iosmobiletabledatasourceediting.allowrowediting>` method returns `True</api/language/true>`.

## Sample code

This class is used in the `iOSTable<iostable.actionsforrow>` event to set up the actions. The `iOSTable<iostable.rowaction>` event is called when an action is used. This is how you would set it up in the `iOSMobileTable</api/ios/iosmobiletable>` events:

``` xojo
Event ActionsForRow(section As Integer, row As Integer) As iOSTableRowActions()
  Var actions(1) As iOSTableRowAction
  ' Create the More button
  actions(0) = New iOSTableRowAction(iOSTableRowAction.Styles.Normal, "More...", "More")
  ' Create the Delete button
  actions(1) = New iOSTableRowAction(iOSTableRowAction.Styles.Destructive, "Delete", "Delete")
  Return actions
End Event

Event RowAction(section As Integer, row As Integer, actionTag As Auto)
  Select actionTag
  Case "More"
    ' ... show more info
  Case "Delete"
    ' ... delete something
  End Select
End Event
```

## Compatibility

iOS projects on the iOS operating system.

## See also

`Object</api/data_types/additional_types/object>` parent class; `iOSMobileTable</api/ios/iosmobiletable>`
