I have a UITableView
with UISwitchs
on them.
When the switch is
I had to do double mySwitch.superview.superview
to get the proper cell.
Here's an example
- (void)switchToggle:(UISwitch *)mySwitch
{
UITableViewCell *cell = (UITableViewCell *)mySwitch.superview.superview;
NSIndexPath *indexpath = [self.tableView indexPathForCell:cell];
NSLog(@"toggle section %d rowID %d", indexpath.section, indexpath.row);
}