Contents

init(_:rowContent:)

Creates a list that computes its rows on demand from an underlying collection of identifiable data.

Declaration

@MainActor @preconcurrency init<Data, RowContent>(_ data: Binding<Data>, @ViewBuilder rowContent: @escaping (Binding<Data.Element>) -> RowContent) where Content == ForEach<LazyMapSequence<Data.Indices, (Data.Index, Data.Element.ID)>, Data.Element.ID, RowContent>, Data : MutableCollection, Data : RandomAccessCollection, RowContent : View, Data.Element : Identifiable, Data.Index : Hashable

Parameters

  • data:

    A collection of identifiable data for computing the list.

  • rowContent:

    A view builder that creates the view for a single row of the list.

See Also

Creating a list from enumerated data