Pretty basic - I have multiple buttons and I just need to tell which button was pressed most recently, despite how many times on each or how long between clicks.
Asked
Active
Viewed 473 times
1 Answers
1
- Give each button a unique tag in Interface Builder.
- Make a variable that holds the tag of the last button that has been clicked.
- In event handlers of your buttons set the variable from the step above to the tag of the button currently being clicked.
- When you need to find the last button that has been clicked, check the variable, it will have the unique tag of your button.

Sergey Kalinichenko
- 714,442
- 84
- 1,110
- 1,523