How can i add custom rounded swipe actions in swiftui?

Viewed 529

in my SwiftUI App, i want to design rounded swipe actions in ListView, as you can see in the following example (Weather App iOS 15)

enter image description here

I know that you can add custom actions like this:

List {
    Text("Pepperoni pizza")
        .swipeActions {
            Button("Order") {
                print("Awesome!")
            }
            .tint(.green)
        }

    Text("Pepperoni with pineapple")
        .swipeActions {
            Button("Burn") {
                print("Right on!")
            }
            .tint(.red)
        }
}

but how can i make this swipe actions rounded? I know that i can change the listRowBackground, but in this case the results looks like this. That is not what i want

enter image description here

Do i need to develop a custom VStack and HStack or should i use UITableView with UIViewRepresentable? What is better in this case? Any suggestions?

0 Answers
Related