Passing parameters on button action:@selector
Edit. Found a neater way! One argument that the button can receive is (id)sender. This means you can create a new button, inheriting from UIButton, that allows you to store the other intended arguments. Hopefully these two snippets illustrate what to do. myOwnbutton.argOne = someValue [myOwnbutton addTarget:self action:@selector(buttonTouchUpInside:) forControlEvents:UIControlEventTouchUpInside]; and – (IBAction) buttonTouchUpInside:(id)sender { MyOwnButton … Read more