I have a view with several buttons that all have the same target and action.
At the moment the action is @selector(doSomething).
I need to be able to determine which button is pressed but I’m not sure of the best way to do this.
The method doSomething is declared as…
-(void)doSomething;
Is there a better way to declare this so I can get more info out?
Thanks for any help!
Oliver
If you declare the method as
with the corresponding selector
@selector(doSomething:), then you can check the identity of the sender using either of the methods Joshua suggested.