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
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)
}
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.