Link Search Menu Expand Document

ContextualAction

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

public class ContextualAction 

Nested Type Aliases

Handler

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

public typealias Handler =
      (ContextualAction, View, @escaping (Bool) -> Void) -> Void

Initializers

init(style:title:handler:)

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

public /*convenience*/ init(style: ContextualAction.Style, title: String?,
                              handler: @escaping ContextualAction.Handler) 

Properties

title

The title displayed on the action button.

public var title: String?

backgroundColor

The background color of the action button.

public let backgroundColor: Color!

image

The image to display in the action button.

public var image: Image?

handler

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

public let handler: ContextualAction.Handler

style

The style that is applied to the action button.

public let style: ContextualAction.Style