Reputation: 11
I have a question about List Row Dynamic in SwiftUI; how reset height of row when EditMode of List changed, For now, ui element of Row has changed, but height of row in the list not update to fit.
anyone know how to fix it? thanks
Upvotes: 1
Views: 4920
Reputation: 18924
Use .fixedSize
.
Example
List {
ForEach(users, id: \.self) { user in
//Your list row view
.fixedSize(horizontal: false, vertical: true) // <-- Here
}
.onDelete(perform: delete)
}
Upvotes: 4