Q:When programming on XCode I found that my app suddenly crashed on launch after adding a little more code. The output panel showed the following error:*** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<Caculator.ViewController 0x79185040> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key OutputScreen.'
A:the problem is in the xib or storyboard file. You have an item (probably a UIButton) linked to play
, but you renamed that item to playbtn
in code, without reassigning the outlet in the xib. Check the play button in your xib/storyboard and remove its non existent outlet
解决步骤: