I'm adding a target to a UISwitch
, I'd like to pass both the sender (UISwitch
) and an object (NSIndexPath
).
I'm not sure on the syntax for this, would be great if anyone could point me in the right direction
[certificateSwitch addTarget:self action:@selector(certificateSwitcher:withIndexPath:) forControlEvents:UIControlEventValueChanged];
method:
- (void)certificateSwitcher:(UISwitch *)sender withIndexPath:(NSIndexPath *)indexpath
also before anyone says put the row number as the UISwitch's
tag property, It's not an option, I have some other stuff that relies on the tag of the UISwitch
Thanks