I wonder if it's possible to structure my app's folder?
Right now I have every file under the root folder.
Can I make a new folder inside that one called VC and put all my VC files in it? Is there anything else I have to remember when if I reorganise my app files? eg file paths etc
You can create a new group, with its own folder, directly in Xcode, but it's not at all obvious. Instead of choosing 'New Group', choose 'Add Files to “<Project>”'. Then, in the file picker dialog, click the New Folder button or press Command-Shift-N and type the name of the new folder/group.
In the Choose a project pane, choose the Browse button to select an Xcode . pbxproj file. Navigate to the project file in the Select Xcode project file dialog, and then choose Open. In the Import from Xcode wizard, choose Next.
A group in Xcode is a "fake" folder which does NOT represent a folder in the file system. It is common to use a combination of groups and folders for a given Xcode project. Follow this answer to receive notifications.
You can very well do that and in fact it is a good practice to organise your Xcode project navigator in similar folder structure as you have in your file system; it really helps.
All you need to do is to right click on your project file name in project navigator and select New Group
.
This should then look like:
And then re-name it to whatever you want. You can then put your files in the correct group based on relevance. I would also advise to add them in similar folder in filesystem.
This is how it look like for me:
PS: You do not need to remember anything like file path etc. Xcode does that for you once you link your file in your target.
YES you can do it by following this way :
1) open your folder project
2 ) create new folder by name VC
3 ) open xcode
4 ) drag and drop your vc folder to left side bar
5 ) check create group folder
6 ) uncheck copy .....
7 ) put your view controller on this folder
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With