I have a UITableViewCell with UISwitch as accessoryview of each cell. When I change the value of the switch in a cell, how can I know in which row
UITableViewCell
UISwitch
One more variant of using superView. Works like category for UIView.
- (UITableViewCell *)superCell { if (!self.superview) { return nil; } if ([self.superview isKindOfClass:[UITableViewCell class]]) { return (UITableViewCell *)self.superview; } return [self.superview superCell]; }