Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key

来源:互联网 发布:联发科p10处理器优化 编辑:程序博客网 时间:2024/06/01 15:38

 

UsernamePasswordor Register

iPhoneDevelopmentFAQ

  • FAQs
  • Ask question
  • Open questions
  • About

Category: Development > Runtime crashes

FAQ: *** Terminating app due to uncaughtexception 'NSUnknownKeyException', reason: '[setValue:forUndefinedKey:]: this class is not key valuecoding-compliant for the key itemName.' (permalink)

Editthis question

Suggest a new answer

Step 1. Typeyour answer


(Use standard BBCode,
e.g. [url]http://a.com[/url],
e.g. [ul][li]..[/ul], etc)

Step 2.EITHER: Login

Username:Password:

...OR: Register now

Email:
Username:
Password:
Anti-spam test: Find the Cat








Answer

If you're using NIB files / Interface Builder, what this error message REALLY means is:

"Your NIB file has a GUI element that's connected (via the Outletsscreen) to an outlet in one of your source files that doesn't exist"

i.e. it usually happens when you change the name of an IBOutletvariable in your source file, and forget to change your NIB file toreflect the change.

(sadly, Interface Builder isn't good enough to automatically renamethe connection, as it is supposed to do - you MUST do it manually)

Additional Suggested Answers

原创粉丝点击