Initializer

init(_:id:rowContent:)

Creates a list that identifies its rows based on a key path to the identifier of the underlying data. あるリストを作成します、それは、それの行それらを、基礎をなすデータの識別子へのあるキーパスに基づいて識別するものです。

Declaration 宣言

init<Data, ID, RowContent>(_ data: Data, id: KeyPath<Data.Element, ID>, rowContent: @escaping (Data.Element) -> RowContent) where Content == ForEach<Data, ID, RowContent>, Data : RandomAccessCollection, ID : Hashable, RowContent : View
Available when SelectionValue is Never and Content conforms to View.

Parameters パラメータ

data

The data for populating the list. リストに満たすためのデータ。

id

The key path to the data model’s identifier. データモデルのもつ識別子へのキーパス。

rowContent

A view builder that creates the view for a single row of the list. あるビュービルダー、それはリストの単一の行に対するビューを作成します。

See Also 参照

Listing Data