I have three buttons set up in Interface Builder, each tied via touchUpInside to btnSelection:
- (IBAction)btnSelection:(id)sender {
NSLog(@"tag: %i", [sender tag]);
}
In my console, the first click registers correctly (after a second or so delay, which seems a bit weird) but any subsequent touch of any of the 3 buttons results in first logging the previous tag value, then logging the new tag.
Touch #1 (btn w/ tag=0):
tag:0
Touch #2 (btn w/ tag=1):
tag:0 tag:1
Touch #3 (btn w/ tag=2):
tag:1 tag:2
and so on.
I can't figure out why two events are being logged each time (with the first being the previously touched button.