I am trying to design a button in swiftUI that will call 1 of the built in menu items (mac only). I know how to replace built in menu item & force it to share the same functionality with a button, but that is not what I want to do. I wish to click the button for, let's say, Copy or Help & have the button (somehow) trigger or programmatically click the menu item itself. It need not display the menu, just run the item. This would be most useful in setting up a contextual menu or convenience button the only purpose of which is to mimic these menu items. I have hunted high & low with little success. Can anyone point me in the right direction or offer a thought or two?
-
Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.Community– Community Bot2022-08-31 13:44:16 +00:00Commented Aug 31, 2022 at 13:44
-
I would like to add a button with an action that will select the mac help menu item.rbkopelman– rbkopelman2022-09-01 00:22:09 +00:00Commented Sep 1, 2022 at 0:22
Add a comment
|