Post

Replies

Boosts

Views

Activity

SwiftUI NavigationLink isActive is not working right on iOS 14.5
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()   } }
2
0
6.5k
Apr ’22