I want to hard code a value inside the @selector
of a UIButton
's action.
When adding a value inside the @selector
I get an error saying:
This is how you normally add a @selector
to a UIButton
:
[myButton addTarget:self action:@selector(myFunction::) forControlEvents:UIControlEventTouchDown];
This is what I want to do:
[myButton addTarget:self action:@selector(myFunction:1:) forControlEvents:UIControlEventTouchDown];
How can this be done?
EDIT: rmaddy pointed out a nice answer here: perfomSelector on button and sending parameters