Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Custom UITableViewCell gives me: this class is not key value coding-compliant

If you are connecting the outlets from the file's owner, you should do different:

1 - Define the class of the UITableViewCell to your TableCell class:

enter image description here

2 - Connect the outlets not from File's Owner, but from TableCell in the objects list:

Connect the outlets


Everything was done right on my project and still received when try to use custom cell with its properties. Here how I solved mine.

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

What actually hit me is simply remove the CustomUITableViewCell Class from the custom cell's "Identity Inspector" and re-enter it.. you will see a changes

  1. Module value
  2. Inherit Module From Target

Let them be the value which automatically comes up... don't try to inherit it or change the inheritance or the Module value...

enter image description here


If you're using Xcode 6 GM, there's a bug in IB that may result this error. I don't think the OP was having this problem because it's more obvious (you can see a "undefined class MyXXXCell" in log) but in cause you get to this question from google like me, just try to enter the class name in IB and hit enter again and once it's really saved in the storyboard/xml file it will be fine.


I had the same problem and any of the comments here or in other discussions helped me...at the end I just made a clean cause I was pretty sure I was doing everything correctly and yes...magically worked!