Post

Replies

Boosts

Views

Activity

Can't get NavigationLinks to work with Menu control in iOS 14
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
Apr ’21
Can't get NavigationLinks to work with Menu control in iOS 14
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.
Replies
1
Boosts
0
Views
1.4k
Activity
Apr ’21