Notice in the gif that once I navigate and dismiss the new view, I am unable to navigate back! Is this a SwiftUI bug or a misuse of NavigationLinks?
struct ContentView: View {
var body: some View {
return NavigationView {
NavigationLink(destination: FakeView1()) {
Text("Navigate")
}
}
}
}
struct FakeView1: View {
var body: some View {
Text("Hey")
}
}
it's simulators bug.Try with your device
This seems swiftUI bug. I also faced the same issue so, I have used this workaround for it.
And for your FakeView1 class.
I have tested and it is working fine.