-2

I am running my app and when I click a navigation button which is supposed to take me to a TableViewController, it crashes, giving me this error:

*** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key index.'

It is also highlighting where the error occurred, pointing to this line in my DataTableViewController class:

CoordinatesCustomCell *cell = [tableView dequeueReusableCellWithIdentifier:@"CoordinatesCustomCell" forIndexPath:indexPath];

I really have no idea what this means and could use some help

github for code: https://github.com/nneeranjun/Maps.git

nilay neeranjun
  • 145
  • 2
  • 14
  • In your github code some of files are missing – Shreyank Jun 08 '16 at 04:36
  • Ok, I was able to fix the error. Now it is not crashing, but when I try to set values for the labels, they are not showing up. Also, what files are missing. I uploaded everything via xcode? – nilay neeranjun Jun 08 '16 at 04:37
  • CoordinatesCustomCell.m reference is there in xcode but not physically file exist – Shreyank Jun 08 '16 at 04:41
  • What had happened before was I had set CoordinatesCustomCell.h to extend UITableViewController instead of UITableViewCell. However, when I changed it, I guess the .m file got messed up so i deleted them and added new ones and it started working – nilay neeranjun Jun 08 '16 at 04:43

2 Answers2

0

this problem maybe caused in xib or stroryboard. Check the class or any other attributes in it of your cell.

Klein Mioke
  • 1,261
  • 2
  • 14
  • 23
0

Check your cell and subviews custom class and connections with owner.enter image description here

Shreyank
  • 1,549
  • 13
  • 24