1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| List{ ForEach(billDateModel.dataSource){ section in Section(header: SectionView(text: section.date) .listRowInsets(EdgeInsets()) .background(Color.green.opacity(0.2)) ) { ForEach(section.bills) { row in RowView(text: row.count) .listRowInsets(EdgeInsets()) .listRowBackground(Color.red.opacity(0.2)) .listRowSeparator(.hidden) } } } } .environment(\.defaultMinListRowHeight, 0) .environment(\.defaultMinListHeaderHeight, 0) .listStyle(PlainListStyle())
.background(Color.blue.opacity(0.1))
|