Devin's Heaven

Easily rename things in Xcode of a projects with refactoring

Refactor

If you’re are like me, you name classes, variables and methods poorly from time to time. You’ll look back on a piece of code at a latter date and scratch your head over the way you call certain functions. These days of painstakenly renaming across an entire application are gone with Snow Leopard and Xcode 3.2. Enter Refractoring! Select the string you want to replace in a file somewhere in Xcode. In this case its the application delegate class name.

Rename

A dialogue box will pop up. Enter the string of how you want the class to appear, and hit preview. It will show you which files will be modified. After hitting Apply, presto and everything is renamed.


*


One Response

  1. David

    Don’t forget control-command-T, like refactoring but operates on local scope only. So if you have an local variable name you wish to change for instance, select the variable name, hit control-command-T, and as you type the replacement name everywhere else inside that variable’s scope will be replaced as well.


Leave a Comment