I have a list and inside each cell there are multiple navigation links to different views, I thought it was possible but it doesn't work properly, here is an example:
struct ContentView: View {
var body: some View {
NavigationView {
List(0..<10) { index in
HStack {
NavigationLink(destination: A()) {
Text("\(index) - Destination 1")
}
NavigationLink(destination: B()) {
Text("\(index) - Destination 2")
}
} .padding()
}
}
}
}
Is there a workaround or should I rewrite everything using a lazyVStack instead of a list? I'd prefer to use a list since it has built-in swipe and pull to refresh gestures