In the following code, I've depicted the issue I'm facing.
- AddContentView - is having just a single label
- ContentView has a navigation link with a text and a navigation link.
The Navigation-link works fine for the first time but stops working afterwords.
import SwiftUI
struct AddContentView: View {
var body: some View {
Text("Hello, World!")
}
}
struct ContentView: View {
var body: some View {
NavigationView {
VStack {
Text("Hello, World!")
NavigationLink(destination: AddContentView()) {
Text("Navigate")
}
}.navigationBarTitle("First")
}
}
}
Please refer to the demo attached here.