Question about using multiple NavigationLinks in same project

Hello,

I want to write an app for following requirements:

  • Four views(A,B,C and D) has navigationlink as a button to move to view E.

so I wrote a navigationlink on view A as follows:

NavigationLink(destination: DestinationView(result: iOSVM.add(a: (Int(numberA) ?? 0), b: (Int(numberB) ?? 0)))) {
                        Text("Add?")
                    }

and another navigationlink on view B like this:

 NavigationLink(destination: DestinationView(result:iOSVM.subtract(a:number1,b:number2))){
                    Text("Result?")
                }

after running these codes, navigationlink on view A works properly. but another one on view B remains diabled.

help me to fix this. thx, c00012

Answered by c00012 in 796429022

I solved the problem. it was my mistake in writing TextField.

Accepted Answer

I solved the problem. it was my mistake in writing TextField.

Question about using multiple NavigationLinks in same project
 
 
Q