I have a NavigationLink view that contains a ScrollView that mainly shows a list of contacts. However, the ScrollView sometimes register user's pop gesture as a scrolling gesture, thereby preventing the user swipe back out of the NavigationLink view.
The general structure is like the follow:
struct ContentView: View {
var body: some View {
NavigationView {
NavigationLink (destination: AnotherView()) {Text("enter")}
}
}
}
struct AnotherView: View {
var body: some View {
ScrollView {
LazyVStack(alignment: .leading) {
// ... a list of things
}
}
}
}
Is there anyway to tell ScrollView to ignore the horizontal-ish drag gestures so that NavigationLink can be swiped out properly and smoothly?