Yesterday, Xcode 11.3 was released, bringing along some new problems. If you navigate to the DetailView and use the default back button to return, you are unable to push the DetailView again. However, with the custom button, it works fine. Do you have any suggestions?
class Model: ObservableObject {
@Published var isPushed = false
}
struct ContentView: View {
@EnvironmentObject var model: Model
var body: some View {
NavigationView {
VStack {
Button("push") {
self.model.isPushed = true
}
NavigationLink(destination: DetailView(), isActive: $model.isPushed) { EmptyView() }
}
}
}
}
struct DetailView: View {
@EnvironmentObject var model: Model
var body: some View {
Button("get me back") {
self.model.isPushed = false
}
}
}
Same problem
struct ContentView: View {
var body: some View {
NavigationView {
VStack {
NavigationLink(destination: Text("Pushed")) { Text("push") }
}
}
}
}