I’m trying to switch over to Storyboard from IB and code but got the following problem. Xcode created a @property with @synthesize and the viewDidUnLoad methods but I now don’t need it and if I try to delete it, the code crashes. To make things worse, I in the meantime had connected it to a UIButton (I changed the class to allow this) by mistake. When it crashes, the code gives the message:
Terminating app due to uncaught exception ‘NSUnknownKeyException’,
reason: ‘[
setValue:forUndefinedKey:]: this class is not key value
coding-compliant for the key lock.’
The question is the following. Where does XCode put the code for this and what do I have to remove to get back to where I started from?
Sounds like you have a connection set up in your nib that uses that property. If you delete the property, you need to update your nib to not try and set it.