1

I have a NavigationController, root view controller called "ViewController" and a second view controller called "SettingsViewController". I have a segue to the "SettingsViewController" from "ViewController" which worked until I tried to connect a UITextField called "usernameField" to the "SettingsViewController" by means of Reference Outlet. When I did I got the following error whenever I try to go to the SettingsViewController:

*** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<_TtC6mayfly22SettingsViewController 0x15e72af0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key usernameField.'

When I googled the error, most people said that it was caused by a reference outlet that got deleted in code but not in storyboard, or something along those lines, however I have thoroughly checked and have tried remaking the text box numerous times. What could I be doing wrong that could be causing this error?

JasonMArcher
  • 14,195
  • 22
  • 56
  • 52
chanceofthat
  • 447
  • 1
  • 4
  • 11
  • 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:22

1 Answers1

1

Solve this problem by cleaning app and rebuilding it. Product > Clean or Shift + Command + K

chanceofthat
  • 447
  • 1
  • 4
  • 11