I'm trying to make segue via IB, that switching views when pressed cell accessory in tableView.
Images from my IB:
1.I'm dragging from cell of tableviewcontroller to another view and selecting Accessory Action -> push
and when i'm running my project i get error:
[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key accessoryActionSegueTemplate
I think that this might be something wrong with reuseIdentifier of cell.
My cellForRowAtIndexPath:
method:
static NSString *CellIdentifier = @"champion cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
NSString *cellIconName = ((championList *)[self.champions objectAtIndex:indexPath.row]).championImage;
UIImage *cellIcon = [UIImage imageNamed:cellIconName];
[[cell imageView] setImage:cellIcon];
cell.imageView.frame = CGRectMake(0.0f, 0.0f, 70.0f, 70.0f);
cell.imageView.layer.cornerRadius = 7;
[cell.imageView.layer setMasksToBounds:YES];
cell.textLabel.text = ((championList *) [self.champions objectAtIndex:indexPath.row]).championName;
cell.detailTextLabel.text = ((championList *) [self.champions objectAtIndex:indexPath.row]).championId;
return cell;
I can use performSegueWithIdentifier: method as solution of this problem, but i want to figure out why i having problem with accessory action in IB.