Initializer

init(_:value:)

Creates an unsortable column that displays a string property, and which generates its label from a string.

Declaration 宣言

init<S>(_ title: S, value: KeyPath<RowValue, String>) where Content == Text, S : StringProtocol
Available when RowValue conforms to Identifiable, Sort is Never, Content conforms to View, and Label is Text.

Parameters パラメータ

title

A string that describes the column.

value

The path to the property associated with the column, which will be used to display as verbatim text in each row of a table.

Discussion 議論

This initializer creates a Text view on your behalf, and treats the title similar to init(_:). See Text for more information about localizing strings. このイニシャライザは、Textビューをあなたの代わりに作成します、そしてタイトルをinit(_:)と同じように扱います。Textを文字列のローカライズについてのさらなる情報として見てください。

See Also 参照

Creating an Unsortable Column