Reputation: 27295
I want to rename about 100 classes in my Xcode project. It would be painful to change every filename, then do a search and replace on the name of each class in question.
Is there a better way?
The change in question involves changing a prefix -- think of what Apple would need to do if they decided to rename all the classes in their "NS" framework to start with "MS". Unfortunately, the two caps in question do start some words in the project which are not among the class names in question.
Upvotes: 3
Views: 2462
Reputation: 27295
If you don't have C++, Shaggy's answer will probably work for you. But in my case, the answer appears to be that there is no better way.
Upvotes: 0
Reputation: 27601
If your version of Xcode is reasonably up-to-date, you can right-click on the symbol name in the editor and choose "Refactor..." which will take care of both renaming files and renaming symbols (with the appropriate checkbox enabled).
Upvotes: 3