ios - What does this mean? "'NSUnknownKeyException', reason:This class is not key value coding-compliant for the key X" -
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 next error. mean? how can prepare 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 right class resolves problem.
by way, bad practice have names "string" in objective-c. invites runtime naming collision. avoid them in 1 time off practice apps. naming collisions can hard track downwards , 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.
ios osx cocoa cocoa-touch interface-builder
Comments
Post a Comment