问题
Team,
I created the new Project, on project folder right click open show in finder there I created "ViewControllers" Folder and again right click Add files to "ProjectName" then I added the created folder i.e., "ViewControllers" which is in blue colour "Expected yellow colour folder" that is reference to my project folder the blue colour folder is not. In blue colour folder when i try to added new file its added an empty File.
How can i reference my added folder to the Xcode project? how to avoid this blue colour folder class in my project?
Your inputs are highly appreciable.
回答1:
If your Xcode project looks like this…
…then you've added your ViewControllers
folder as folder reference.
To change this folder to a group follow these steps:
- Right click on
ViewControllers
- Choose
Delete
in the context menu - Choose
Remove Reference
in the dialog that popped up. The folder will be removed from your Xcode project but not from the file system. - Then choose
Add Files to <YourProjectName>…
in theFile
menu - Find your
ViewControllers
in the file system - Before clicking
Add
make sure that the optionCreate groups
is selected - Click
Add
You've added your ViewControllers
folder as group:
Important note regarding Xcode 8:
The option Create groups
might not be visible right away. Apple moved this in Xcode 8 to the bottom of the Add Files to…
dialog:
This reveals the option Create groups
:
来源:https://stackoverflow.com/questions/39983391/adding-folder-to-xcode-project-is-not-properly-added