I wanted to rename one badly named variable to something more naturally named (UITableView myListView –> myTableView). Did that with XCode “Edit – Find – Find in project” and replaced all found 7 items with the new one. Application compiled ok, started and crashed.
After some debugging found out that there was one (1) old name remaining inside XIB file xml spagetti (IBConnectionRecord, IBCocoaTouchOutletConnection)!
Question: how should I rename variables? Is there something that works right away?
This is called refactoring and if you use the refactor tool that Xcode ships with, then also XIB variables will be renamed. Just highlight the variable/method you want to refactor, hit
CMD+SHIFT+Jand you see the refactor window.It’s probably best if you do this from the
.hfiles.