Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There is a simple explanation at the end of this answer, but I've seen a few similar questions recently so I thought I'd give a bit of background. </p> <p>The error should also be telling you <em>which</em> key the class is not key value coding compliant for. The phrasing of your question suggests that you think there is some general bit of code you can add to make a class "key value coding compliant". This isn't the case. </p> <p>All cocoa / cocoa touch objects are capable of performing key value coding operations. KVC allows you to reach accessor methods by using <code>valueForKey:</code> or <code>setValue:forKey:</code> instead of using the accessor methods directly. </p> <p>The error you are seeing will be along the lines of:</p> <blockquote> <p>XXX - this class is not key value coding compliant for key YYY. </p> </blockquote> <p>XXX is the class in question, YYY is the key. So somewhere, <code>[xxx setValue:something forKey:@"YYY"]</code> is being called. </p> <p>At this point, you're thinking "but I've never used <code>setValue:forKey</code> in my code!". You may be right. But it <em>is</em> used by the frameworks when you load a xib file - all the outlets are set using key-value coding. </p> <p>So, you will have an outlet in your xib that is connected to something that has since been removed or renamed in the class it links to. If you're lucky, it will have a little exclamation mark next to it. If you're not, you won't even see it in interface builder and you'll have to edit the xib as source code and remove it from the XML. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload