Hi,
I am trying to get a navbar menu item which should open a new view when selected but I can't get NavLink to work with Menu.
.toolbar {
ToolbarItem(placement: .navigationBarLeading) {
Menu {
NavigationLink(destination: TestView()) {
Text("Test Navlink")
}
}
label: {
Label("Add", systemImage: "plus")
}
}
		 }
Aside from seeing this warning:
[UILog] Called -[UIContextMenuInteraction updateVisibleMenuWithBlock:] while no context menu is visible. This won't do anything.
I don't see any other error or warning in debugger. Code runs but nothing happens when you tap the menu item. It doesn't open the new view.
Any assistance would be greatly appreciated.
1
0
1.4k