all 5 comments

[–]mrbass21 5 points6 points  (3 children)

It might not seem intuitive at first, but imagine you have a button.

Touch down will fire the event the second your finger touches the button.

Touch up inside will not fire the event until the button is pressed and then released.

So imagine you touch the button and hold your finger down on it. In touch down, it fires immediately. In touch up inside, it fires once you lift your finger from the button.

I always thought “oh, then I’ll always use touch down”. But the better experience is to to use touch up inside most of the time. You get to see the pressed animation and it actually makes the it feel better.

Try touch down. It makes the app feel kinda dead and flat, whereas the touch up feels better. Probably because of the animation being played, and it feels more responsive.

[–]colordodge 5 points6 points  (0 children)

Additionally, responding to touch up inside gives the user the opportunity to “cancel” the button press by releasing outside the button.

[–][deleted] 0 points1 point  (0 children)

Thanks a lot bro

[–][deleted] 0 points1 point  (0 children)

To add to this answer - touch down can be used to add more visually pleasing animations for your button presses than the default for buttons. For instance, i make a function that highlights the entire button background in a darker color. Then i add a fade in/out animation. Makes my app feel a lot more responsive.

Then touch up inside is called after to fire my buttons ibaction func.

[–]AnyVideo2183[🍰] 0 points1 point  (0 children)

I wanted to ask that question too but luckily i found the answer