i don't know if this problem is swift ui problem or does it simulator problem. I didn't get a chance to try it on the real device.
When I first click on the post but it does not go back when I click.
import SwiftUI
struct ContentView: View {
var body: some View {
Text("Hello, World!")
}
}
struct SecondView: View {
@State var clicked = false
var body: some View {
NavigationView {
NavigationLink(destination: ContentView(), isActive: $clicked) {
Text("Click")
}
}
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
SecondView()
}
}
For example: https://gifyu.com/image/mV1D