@selector with multiple arguments
问题 How does one call an @selector method with multiple arguments? I have the following [self performSelector:@selector(changeImage:withString:) withObject:A1 withObject:fileString2 afterDelay:0.1]; but get an unrecognized selector sent to instance error My method I am calling is as follows -(void) changeImage: (UIButton *) button withString: (NSString *) string { [button setImage:[UIImage imageNamed:string] forState:UIControlStateNormal]; } 回答1: You should use NSInvocation NSInvocation