2
I’m making a program for Mac and need to find a way to "click" a button from a code.
I’m trying to put this code on another button and I’ve tried it in the 3 following ways:
func mouseDown(_ NSButton1: NSEvent) { }
func performClick(_ NSButton1: NSEvent) { }
Button1.sendActionsForControlEvents(NSControlEvents.TouchUpInside)
Someone knows how to do it?
Welcome to Stack Overflow! Could you edit your question and post together the code of what you have tried? Also take the opportunity to take a look at the page How To Ask that will help you build your question better
– Chun