Post marked as unsolved
Click to stop watching this post.
You have stopped watching this post. Click to start watching again.
Post marked as unsolved with 10 replies
1.4k
Views
NavigationLinks only work once?
Hi,I have the issue (on iOS/iPadOS) once a NavigationLink was tapped/used it won't trigger the navigation again after navigating back. The most minimal code example would be:struct ContentView: View {
var body: some View {
NavigationView {
NavigationLink(destination: PushedView()) {
Text("Press Me").font(.largeTitle)
}
}
}
struct PushedView: View {
var body: some View {
Text("Hello")
}
}
}So once "Push Me" was tapped and the navigation triggered it won't work again after navigating back. (Only tested in simulator so far.) Am I missing something?Kind regards, Michael