Is it possible for a NavigationLink to go to a different page while also having a swipe gesture do something? I'm working on a to-do app and my thought is to let the swipe gesture delete the item, and a tap on the item just take you to the edit page. Now, tapping on the item does nothing with the gesture modifier applied because it's always just listening for a swipe. Any workarounds?
SwiftUI swipe gesture making NavigationLink ignore taps.
Hi @gpost ,
Have you tried something like this?
NavigationStack {
List {
NavigationLink("NavLink", value: "test")
.swipeActions {
Button("Btn") {
print("btn!")
}
}
}
.navigationDestination(for: String.self){ string in
Text(string)
}
}
This should allow you to do both