SwipeTableViewCellDelegate

public protocol SwipeTableViewCellDelegate: class

The SwipeTableViewCellDelegate protocol is adopted by an object that manages the display of action buttons when the cell is swiped.

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

    Declaration

    Swift

    func tableView(_ tableView: UITableView, editActionsForRowAt indexPath: IndexPath, for orientation: SwipeActionsOrientation) -> [SwipeAction]?

    Parameters

    tableView

    The table view object which owns the cell requesting this information.

    indexPath

    The index path of the row.

    orientation

    The side of the cell requesting this information.

    Return Value

    An array of SwipeAction objects representing the actions for the row. Each action you provide is used to create a button that the user can tap. Returning nil will prevent swiping for the supplied orientation.

  • Asks the delegate for the display options to be used while presenting the action buttons.

    Note

    If not implemented, a default SwipeTableOptions instance is used.

    Default Implementation

    Default implementation of SwipeTableViewCellDelegate methods

    Declaration

    Swift

    func tableView(_ tableView: UITableView, editActionsOptionsForRowAt indexPath: IndexPath, for orientation: SwipeActionsOrientation) -> SwipeTableOptions

    Parameters

    tableView

    The table view object which owns the cell requesting this information.

    indexPath

    The index path of the row.

    orientation

    The side of the cell requesting this information.

    Return Value

    A SwipeTableOptions instance which configures the behavior of the action buttons.