Saturday, 15 August 2015

ios - Unable to resolve 'Class is not key value coding-compliant' -



ios - Unable to resolve 'Class is not key value coding-compliant' -

i created class xib file , uilabel in it, using interface builder. uilabel linked iboutlet in corresponding .h class. deleted xib file, next error message upon execution:

*** terminating app due uncaught exception 'nsunknownkeyexception', reason: '[<childviewcontroller 0x91d9340> setvalue:forundefinedkey:]: class not key value coding-compliant key <iboutletname label>.'

i tried clean project, delete references iboutletname in project, tried find name grep in code, still have issue. thought can find name , delete ?

thanks !

to find name used, first type outlet code. if xcode determines there connection outlet, fill in circle in left margin. click on circle, , should see this

for future reference, should delete connections in xib or storyboard, before deleting corresponding iboutlets/ibactions code. this,

open xib select file's owner open connections inspector delete connections

then go source code, , verify none of corresponding iboutlets/ibactions have filled circles in left margin.

if problem persists, may help delete build directory, , delete app device.

to delete build directory

open xcode (but don't open project) in window menu, select organizer select projects @ top of organizer window right click on project name in list @ left select remove organizer... popup menu click delete

ios xcode interface-builder uilabel

No comments:

Post a Comment