Initializer

init(_:content:)

Creates an instance that computes table rows on demand over a given constant range.

Declaration 宣言

init<V>(_ data: Range<Int>, content: @escaping (Int) -> Content) where Data == Range<Int>, ID == Int, V == Content.TableRowValue
Available when Data conforms to RandomAccessCollection, ID conforms to Hashable, and Content conforms to TableRowContent.

Parameters パラメータ

data

A constant range. ある定数範囲。

content

The table row builder that creates rows dynamically.

Discussion 議論

The instance only reads the initial value of the provided data and doesn’t need to identify rows across updates. To compute rows on demand over a dynamic range, use ForEach/init(_:id:content:).

See Also 参照

Creating a Collection of Table Rows