Reputation: 2549
The navigation link in the following code stays highlighted even when the navigation is popped.
Comment out one of the two and it works as expected.
Tested with iOS 14 beta 6 and Xcode 12 beta 6
struct ContentView: View {
var body: some View {
NavigationView {
VStack {
List {
NavigationLink(destination: Text("B")) {
Text("A")
}
}
Text("Bottom") // <- this
}
.background(Text("Hi")) // <- and this
}
}
}
Upvotes: 1
Views: 282
Reputation: 71
This happen also to me when text is on top, weird
struct ContentView: View {
var body: some View {
NavigationView {
VStack {
Text("Top") // <- this
List {
NavigationLink(destination: Text("B")) {
Text("A")
}
}
}
}
}
}
Upvotes: 1