-2

Yesterday I added a new class and created a IBOutlet with a label called labelDays. I then deleted that class now I get this exception. I think that it is because it is looking for the label but since I deleted the class it can't find it. I am using Xcode 6.

2015-01-09 13:25:25.909 Test App1! [1462:52506] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIViewController 0x7fb08bf32000> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key labelDays.'
  • possible duplicate of [What does this mean? "'NSUnknownKeyException', reason: ... This class is not key value coding-compliant for the key X"](http://stackoverflow.com/questions/3088059/what-does-this-mean-nsunknownkeyexception-reason-this-class-is-not-key) – jtbandes Aug 03 '15 at 06:26

2 Answers2

1

When you deleted your class, it looks like you left the object in Interface Builder, and converted it object into a UIViewController.When your app tries to link up the outlets, it crashes because UIViewController does not have a property called labelDays. In your interface, select your object and open the Inspector view:

In the top-right corner of Xcode

and go into the Connections Inspector:

enter image description here

Then, find your outlet and click the "X" button to remove it.

NobodyNada
  • 7,529
  • 6
  • 44
  • 51
0

Maybe you should go to the Connections Inspector in the Storyboard and delete the outlet

Aseider
  • 5,875
  • 1
  • 14
  • 25