Given the following View
import SwiftUI
struct ContentView: View {
init() {
UITableViewCell.appearance().backgroundColor = .black
UITableView.appearance().backgroundColor = .black
}
var body: some View {
List {
Text("foo").listRowBackground(Color.gray)
Text("bar").listRowBackground(Color.gray)
Text("foo").listRowBackground(Color.gray)
Text("bar").listRowBackground(Color.gray)
}
.listStyle(.insetGrouped)
}
}
which renders as follows
How would one add a border around the list elements following the rounded corner of the InsetGroupedListStyle like this red border
I have tried adding borders and shadows to either the List or the cells but they never match an insetGrouped cell "block".


