In my code I've to pass two arguments to targetMethod printMethod
, I can pass the button.tag as one argument and how to pass the other argument?
Please Give an Example.
My code:
button.tag = indexPath.row;
secondArgument = indexPath.section;
[button addTarget:self action:@selector(printMethod:) forControlEvents:UIControlEventTouchUpInside];
-(IBAction)printMethod:(UIButton*)sender{
NSLog(@"%d%d",sender.tag,//SecondArgument);
}