SwiftUI List Items implement swipe multiple actions

553 views Asked by At

Is multiple actions not yet supported with SwiftUI when swipe List items?

This is really disappointed I can't find a way to implement this using SwiftUI .

Need some advices folks I really do need to implement something similar

enter image description here

1

There are 1 answers

4
Cristian Zumelzu On

You can use swipe actions (supported by ios 15>) https://developer.apple.com/documentation/swiftui/view/swipeactions(edge:allowsfullswipe:content:)

  .swipeActions(edge: .leading, allowsFullSwipe: false) {
                        Button {
                            action = "Star"                      
                        } label: {
                            Label("Star", systemImage: "star.circle")
                        }
                        .tint(.yellow)
                    }
}