Adding Folder to Xcode Project is not Properly added

冷暖自知 提交于 2019-12-04 00:03:42

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 the File menu
  • Find your ViewControllers in the file system
  • Before clicking Add make sure that the option Create 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:

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!