ios - What does this mean? "'NSUnknownKeyException', reason: … this class is not key value coding-compliant for the key X" -


i'm trying link uilabel iboutlet created in class.

my application crashing following error. mean? how can fix it?

*** terminating app due uncaught exception 'nsunknownkeyexception', reason: '[<uiviewcontroller 0x6e36ae0> setvalue:forundefinedkey:]: class not key value coding-compliant key xxx.'

your view controller may have wrong class in xib.

i downloaded project.

the error getting

'nsunknownkeyexception', reason: '[<uiviewcontroller 0x3927310> setvalue:forundefinedkey:]: class not key value coding-compliant key string.'

it caused second view controller in mainwindow.xib having class of uiviewcontroller instead of secondview. changing correct class resolves problem.

by way, bad practice have names "string" in objective-c. invites runtime naming collision. avoid them in once off practice apps. naming collisions can hard track down , don't want waste time.

another possible reason error: when copying & pasting elements 1 controller another, xcode somehow keeps link original controller, after editing & relinking element new controller.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -