Hello everybody,
I am trying to navigate from one view to another using NavigationView and NavigationLink.
I can't figure out what I am doing wrong, but the way I am doing it I get a warning saying:
"Result of NavigationLink<Label, Destination> is unused".
In fact, I can't navigate to the view I want to open.
Here is my code so far:
Thank you for your help!
I am trying to navigate from one view to another using NavigationView and NavigationLink.
I can't figure out what I am doing wrong, but the way I am doing it I get a warning saying:
"Result of NavigationLink<Label, Destination> is unused".
In fact, I can't navigate to the view I want to open.
Here is my code so far:
Code Block NavigationView { VStack { Button(action: { let observation = self.createObservation() self.records.addObservation(observation) self.isPresented.toggle() NavigationLink(destination: ObservationDetails(observation: observation).environmentObject(self.records)) { EmptyView() } }) { Text("Classify") } }
Thank you for your help!