Logan Craft
Logan Craft

Reputation: 639

Error setValue:forUndefinedKey Xcode

[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key image.

This is the error code if you have any info or help that would be great

Upvotes: 0

Views: 740

Answers (2)

TheTiger
TheTiger

Reputation: 13364

This is also happen when you set @property to any IBOutlet object and forgot to @synthesized it. Make sure the object for which you have set the @property in ViewController.h file should be @synthesized in ViewController.m file.

So reason of this error is IBOutlet object is not set correctly with in XIB and you're using this object any where in your code.

Upvotes: 0

Andy Obusek
Andy Obusek

Reputation: 12842

This happens when you change the name of an IBOutlet property or remove an IBOutlet property for which a nib (Interface Builder) file still has a reference. Look for a nib related to the screen where you are experiencing the error, and look for an outdated connection in the Connections inspector that references a property that either changed names or was since deleted.

Upvotes: 1

Related Questions