Connecting Multiple Buttons to one action?
- by David
Hello,
I have multiple UIButtons in my app. I also use interfacebuilder. In my .h i have something like this
IBOutlet UIButton *button1;
IBOutlet UIButton *button2;
IBOutlet UIButton *button3;
- (IBAction)buttonPressed;
Then In my m i want to do something like this
(IBAction)buttonPressed {
if (theButtonIpressed == button1) {
}
}
The problem is I don't have something called "theButtonIpressed" so I cant do this. What should my if statement look like?
Thanks,
-David