I have a method:
-(void)pickTheQuiz:(id)sender etat:(int)etatQuiz{
//i need to get the etatQuiz value here
}
and somewhere in my code, i call the method above like this:
int etat_quiz=4;
[button addTarget:self action:@selector(pickTheQuiz:etat:)withObject:etat_quiz forControlEvents:UIControlEventTouchUpInside];
When doing so, i got error:
Receiver type UIButton for instance message does not declare a method with selector 'addTarget:action:withObject:forControlEvent
EDIT:
-(void)pickTheQuiz:(id)sender etat:(int)etatQuiz{
NSLog(@"The part number is:%i",((UIControl*)sender).tag);
}