Contents

init(_:value:content:)

Creates a sortable column for Boolean values with a text label.

Declaration

init(_ text: Text, value: KeyPath<RowValue, Bool>, @ViewBuilder content: @escaping (RowValue) -> Content)

Parameters

  • text:

    The column’s label.

  • value:

    The path to the property associated with the column, which will be used to update and reflect the sorting state in a table.

  • content:

    The view content to display for each row in a table.

Discussion

This initializer creates a Text view on your behalf, and treats the localized key similar to init(_:tableName:bundle:comment:). See Text for more information about localizing strings.

See Also

Creating a sortable column