I'm trying to print on/off when the user changes the state of my UISwitch.
For example
- (IBAction)toggleSwitch:(id)sender {
ChannelsTableViewCell* cell = (ChannelsTableViewCell *)[sender superview].superview;
NSIndexPath *indexPath = [self.tableView indexPathForCell:cell];
if (cell.localSwitch.on)
{
NSLog(@"On");
}
}
When I run this it throws an error.
2014-04-24 11:33:41.462 HRApp[3258:60b] -[UITableViewCellScrollView localTitle]: unrecognized selector sent to instance 0x19354410 2014-04-24 11:33:41.467 HRApp[3258:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UITableViewCellScrollView localTitle]: unrecognized selector sent to instance 0x19354410'