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