Search code examples
iphonexcodecrashcalculatorcs193p

Wired a calculator button without the code, deleted it, and now simulator crashes


I'm fairly new to xcode so I apologize if this question is trivial. I'm following the lectures on itunesU for CS193P if that helps to know beforehand.

I created the calculator and everything was running fine. I then wired up a sqrt button in the xib file to my IBAction operation pressed. However, I did not have the code implemented in it in my CalculatorBrain.m file. I ran the program, and it worked just fine until I hit an operation (*,+,etc) so I deleted the sqrt operation thinking that would be the source of the error but it still crashes.

Any idea what I need to do in order to return the program to a working state? Thanks


Solution

  • you have to remove your reference in Interface Builder when you delete an object (i.e. the button).