I have a method like this:
-(void)A:(int)a B:(int)b{
}
and want to put the method into a new thread:
NSInvocationOperation *theOp = [[NSInvocationOperation alloc]initWithTarget:self selector:@selector(A:B:) object:nil];
but “EXC_BAD_ACCESS”.
From Apple’s docs: “The selector to invoke when running the operation. The selector may take 0 or 1 parameters;”. So if you want to call a method with more parameters, create an extra method with a single parameter and call the method with more parameters from there.