I have a list like this:
List {
ForEach(litters, id: \.id) { litter in
LitterView(litter: litter)
.confirmationDialog("Are you sure that you want to delete " + litter.name + " ?",
isPresented: $showingLitterDeletionConfirmation,
titleVisibility: .visible) {
Button("Delete " + litter.name, role: .destructive) {
deleteLitter(id: litter.id)
litters = getAllLitters()
}
Button("Annuler", role: .cancel) {}
}
.swipeActions(edge:.leading) {
Button(action: {
showingLitterDeletionConfirmation = true
}) {
Image(systemName: "minus.circle")
}
.tint(.red)
}
.swipeActions(edge:.trailing) {
Button(action: {
litter.clean()
litters = getAllLitters()
}) {
Image(systemName: "paintbrush")
}
.tint(.green)
}
.listRowInsets(EdgeInsets())
.listRowSeparator(.hidden)
.cornerRadius(20)
}
}
.scrollContentBackground(.hidden)
}
I added a cornerRadius(20) to the LitterView. It applies correctly to the main content of the list row, but if I swipe to show my swipeActions, the corner radius follows the content, and does not apply to the swipe action:
Here is the target I am looking for:


It only applied to
.listStyle(InsetGroupedListStyle())is whats you look for it in the SwiftUI. Also screenshot was make by me.