Possible Duplicate:
Arguments in @selector
This is probably a really simple question, but I need a really good answer...
Using the following code I can call a method when a button is clicked...
[pushButton addTarget:self action:@selector(pushOrPull:andVI:) forControlEvents:UIControlEventTouchUpInside];
[pullButton addTarget:self action:@selector(pushOrPull:andVI:) forControlEvents:UIControlEventTouchUpInside];
The method is below...
-(void) pushOrPull: (int)pushPull andVI: (NSString *) videoId {
}
I want the buttons to be able to supply arguments to that method, but when I try this...
[pushButton addTarget:self action:@selector(pushOrPull:2 andVI:@"someVID") forControlEvents:UIControlEventTouchUpInside];
[pullButton addTarget:self action:@selector(pushOrPull:1 andVI:@"someVID") forControlEvents:UIControlEventTouchUpInside];
Xcode gives me two errors: "expected )"
How can I supply these two arguments to the method when my buttons get tapped?