I'm trying to have a navigation link that is triggered programatically. If I use the following code, on iOS, then the second NavigationLink is not put into the UI, as expected. On watchOS, however, there's a visible button with no text.
How can I accomplish this on watchOS?
How can I accomplish this on watchOS?
Code Block swift var body: some View { NavigationView { VStack { NavigationLink("No login required", destination: UnprotectedView()) NavigationLink(destination: ProtectedView(), isActive: $isActive) { EmptyView() } Button("Login required", action: pushIfAuthenticated) } .navigationBarTitle("Choose") } }