Hi! I've a small question! I want pass two value from button to a function and i've found the invocation method to make it. But i don't know how to launch the method from button! Example:
//INVOCATION
SEL mySelector = @selector(playAtTime:setPlay:);
NSInvocation *inv = [[NSInvocation alloc] init];
[inv setSelector:mySelector];
//VARS
int initTime = 5;
BOOL play = YES;
[inv setArgument:&initTime atIndex:2];
[inv setArgument:&play atIndex:3];
//HOW TO USE IT IN BUTTON?
[myButton addTarget:self action:mySelector forControlEvents:UIControlEventTouchUpInside];
//playAtTime:setPlay: are the value to pass in the function
//myButton is the button for launch the function
i hope in yours help!
Please. Thank's jj