How to define which button pressed if they both have same IBAction?
I have two UIButtons (I create them using IB), which connected to File's owner with the same IBAction, how can i define which of them are pressed? Your action can be implemented like this: - (IBAction) buttonTapped: (id) sender // you can also replace id with UIButton* Then inside this method you can check by -isEqual: method - (IBAction) buttonTapped: (id) sender { if ([sender isEqual:referenceToOneOfYourButtons]) { // do something } else if ([sender isEqual:referenceToTheOtherButton]) { ... } } Alternatively you can set up different values to tag property of buttons and then: - (IBAction)