Here is the demo code, even the "isActive" is "false", tap(longPress dragInside) the
Text still can active the NavigationLink.
But this code should run well before iOS 14.5. How could Apple make such a low-level mistake.
More than two NavigationLinks in List makes me very depressed.
import SwiftUI
struct ContentView: View {
@State var isActive = false
var body: some View {
NavigationView{
NavigationLink(
destination: Text("Destination"),
isActive: $isActive,
label: {
Text("NavigationLink")
.padding()
})
.navigationBarTitle("Demo", displayMode: .automatic)
}.navigationViewStyle(StackNavigationViewStyle())
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
Selecting any option will automatically load the page