-1

I just got the following exception in XCode: "This class is not key value coding-compliant for the key". I've read that others having the same problem and it seems that some linking in the xib file are wrong, I just can't find out what in my project.

Could someone please help me?

Project link: https://docs.google.com/file/d/0B4RED3xS6-XhRVdUa0xOLTR5NGc/edit?usp=sharing

EDIT: Problem solved, in my AppDelegate I was insatiate UIViewController with the nib "MainViewController" instead of "MainViewController" class. Therefor the view were used but not connected to the controller.

bjorkblom
  • 1,849
  • 3
  • 21
  • 31

4 Answers4

1

This exception is raised when you have deleted some outlet in your .h and .m file, but forget to unwire it in xib file. Check out all connections are fresh or not. Reconnect all.

NightFury
  • 13,436
  • 6
  • 71
  • 120
1
  1. If your connection panel contains any deleted object, then it will happen.Just remove it and set the connection properly.
  2. If your Target's Main interface contains any options, then it can happen. So remain it as blank
manujmv
  • 6,450
  • 1
  • 22
  • 35
1

Simple way to resolve this issue is delete your XIB file and create a new one.

Prateek Prem
  • 1,544
  • 11
  • 14
0

If you have a control in your nib (xib file) that is linked to a property (IBOutlet) or method (IBAction) in your view controller, and you have either deleted or renamed the property or method, the runtime can't find it because it has been renamed and therefore crashes.

Just remove yellow colored outlet connections and I think it will work.

Shardul
  • 4,266
  • 3
  • 32
  • 50