Reputation: 10245
I am using Finder to navigate to the destination that my ios project sits in. There are two files that I would like to rename the main one it is in and then the sub file with the same name as the main one.
I have tried just right clicking and renaming but then when I open my project all of the files inside the navigator are red and cannot be clicked.
Is there any way to do this or am I out of luck?
**edit, I can change the name of my main file without buggering up all of the files inside, however the subfile that actually has all of the files in it cannot be changed.
If you look below I would like to change the name of testTable2 but if I do that when you go back into xcode all the file names appear red.
Upvotes: 2
Views: 624
Reputation: 24753
In XCode, if you click on a selected file, it'll allow you to change the name of the file, in the same way you do in Finder, and it'll automatically change the project to point to the new file.
Upvotes: 1
Reputation: 16938
Rename the files from within Xcode. Select the file name, wait a second, click it again and the name will become editable. The file is renamed on disk and in the project.
When you rename a file outside of Xcode that is part of an Xcode project, Xcode has no way of knowing what you did, so the file (with it's old name) appears in red in Xcode, meaning "I can't find this file." In this case, you would have to remove that reference in the Xcode project and re-add the file (with it's new name).
Upvotes: 0