开发者

iPhone App Crash - Error? [duplicate]

开发者 https://www.devze.com 2022-12-30 03:21 出处:网络
This question already has answers here: Xcode - How to fix 'NSUnknownKeyException', reason: … this class is not key value coding-compliant for the key X" error?
This question already has answers here: Xcode - How to fix 'NSUnknownKeyException', reason: … this class is not key value coding-compliant for the key X" error? (78 answers) 开发者_开发知识库 Closed 7 years ago.

Im new im making in making iPhone apps so i have no idea what this error means ?

I saw another post with this error but i couldn't figure out how to get it right..

i get this error:

Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key ImageView.'

and i have no clue what this means ? 0.o

can some help me here ?

Thanks!


You might have changed the name of the IBOutlet your nib file refers to.

  1. Check each connection in your nib file to see what it references
  2. Search in your code for that reference to confirm it's there.


Check your nib to see if you have an outlet or action hooked up to a property that no longer exists in the view controller.


I ran into this issue after deleting an object I created in Interface Builder. Deleting the object did not erase all of the code artifacts it had produced.

Here is how I removed the unwanted information in XCode 4.3:

  1. Ctrl + Click the interface builder file, Open As -> Source Code
  2. Press Cmd + F to search for "imageView"
  3. Delete the corresponding XML element. For example, you might erase this entire block of text:

    <outlet property="imageView" destination="9W1-Bu-YFJ" id="9xu-Y0-uYk"/>

  4. Repeat steps 2-3 as necessary


You're probably missing the @synthesize for imageView.

0

精彩评论

暂无评论...
验证码 换一张
取 消