views:

159

answers:

3

is it possible to rename/refactor a class file and have it rename the actual file on disk? if so, how can i do this?

+1  A: 

Right click on the filename in the XCode file browser and pick "rename".

Screenshot

Carl Norum
+1  A: 

By default, Xcode will rename a file when you rename it in either the file navigator (left hand outline view thingy) or when you use the inspector.

bbum
+5  A: 

For me it's always renamed the files when I refactored the class name. I generally right-click on the class name in the interface (.h) file, choose "Refactor", and Xcode asks if I want to rename the files as well as changing the code.

nevan
This approach is best, since it will rename class instances held in other files or XIB files.
Kendall Helmstetter Gelner