Press and hold button


I have buttons which works as +/- to add or subtract a number. When I click on it a number is added or subtracted to my variable also I have code to handle auto repeat mode when user presses and holds the button. The problem is that when I hold a button for a little bit, my number increases, label also changes but… the Action doesn’t get called for some reason, so label is updated but formula isn’t invoked… Button is connected to an Action using Touch Up Inside, I tried other Sent Events for the button but it still doesn’t work… Any suggestions?


can you paste the code ?


TouchUpInside is only going to fire after you let go of the button.
TouchDown will fire when you first touch the button.

We need more information on the actual problem.


Yes thanks. I actually was able to resolve the problem. The issue was that I have separate code for buttons (custom stepper) and I had to invoke actions in code without dragging any connections.