Error about this class is not key value coding-compliant for the key

Source: Internet
Author: User

Tag: IOS nsunknownkeyexception, lost connection


With the increasing number of viewcontroller and its controls in the application, sometimes an inexplicable error is reported and you do not know how to handle the error. For example, I encountered this error:


* ** Terminating app due to uncaught exception 'nsunknownkeyexception', reason: '[<xxxxxxxxxxx 0x000000> setvalue: forundefinedkey:]: this class is not key value coding-compliant for the key*


The answers on the Internet are complete, so I won't be ugly. The reason is that a control was previously connected to a variable in a viewcontroller. But for some reason, this connection is lost, however, the connected variable is still present, which causes this problem.

Troubleshooting is also very easy, find suspicious. h file to see if there are any lost connection variables, 650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/4C/EE/wKiom1RHt17jcRcxAAFjYdHkJFM425.jpg "Title =" 3dbe88fd-95a5-4eff-b94e-117f87b68759.png "alt =" wkiom1rht17jcrcxaafjydhkjfm%.jpg "/>

The variable tackit in the figure is the culprit of this error. You can delete it or re-establish a connection to solve the problem.

For reference only.


This article from the "fire of sin" blog, please be sure to keep this source http://glimjoe.blog.51cto.com/4294289/1566914

Error about this class is not key value coding-compliant for the key

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.