Search code examples
objective-cxcode4refactoringinterface-builder

Unrecognized selector sent to an instance after refactoring - Xcode4


I'm trying to clean up some old code that I wrote to comply with Apple's guidelines on method naming etc. and encountered this. Basically, I have a button in Interface builder and a tapDown action connected to an event handler in my implementation file. I've changed the name of this event handler via the refactor tool built into Xcode. The name of the method is updated in the .h / .m files and in the IB GUI. I've also looked at the raw xml .xib file and there's no trace of my old method name.

When I click on the button however, I get an error saying unrecognized selector oldMethodName:. The error shows that something is still trying to call my older method, but I'm not sure what it is. What else can it be?

Thanks,
Teja.


Solution

  • Damn, figured it out a second after posting this question. The app on the simulator wasn't getting updated for some reason. Did a 'Reset content and settings' on the simulator and it works now.