I’m making an attempt to stop the ‘swipe-back’ animation after an alert is offered. Under is the reproducible code:
struct ContentView: View {
@State personal var showingAlert = false
var physique: some View {
Checklist {
Textual content("Archive")
.swipeActions(edge: .trailing, allowsFullSwipe: false) {
Button {
showingAlert = true
} label: {
Picture(systemName: "archivebox.fill")
}
.tint(.yellow)
}
.alert("Archive?", isPresented: $showingAlert) {
Button("Archive") {
showingAlert = true
}
Button("Cancel", function: .cancel) {
showingAlert = false
}
} message: {
Textual content("Some message")
}
}
}
}
Right here is the way it seems:
However I would like the row to remain in place in order that the archive button is seen, and to animate again upon person interplay (in the event that they select cancel or archive). I assume that is potential?