Moving Files into a Real Folder in Xcode

前端 未结 12 1075
北恋
北恋 2020-12-02 03:20

When I started my project I was happy to use Groups in Xcode rather than literal folders: Since I\'m using the browser in Xcode to access everything, stuff was nicely organi

12条回答
  •  时光说笑
    2020-12-02 03:58

    I've found the most reliable way to work around XCode's appalling design here is to organize ALL your files in Finder, for two reasons:

    1. Finder doesn't make "mistakes", unlike XCode's GUI
    2. Once things are organized in Finder, you can drag/drop entire Finder folders into XCode, and ... it does exactly what you wanted, with no effort

    Even when moving existing XCode files around, it is quicker to do this:

    1. Select the files in Finder
    2. Create a folder in Finder for them
    3. Drag/drop them to the folder (automatically Moves them)
    4. Drag/drop the Finder folder into Xcode (automatically: creates the Xcode folder, adds every file in the Finder folder)
    5. cmd-select every "red" file you now see in Xcode (because you moved them) and hit the delete key

    NB: I never use the "create dragged folders with sub-groups" option, because in XCode 3 that was often hopelessly buggy and could corrupt projects. Apple clearly (IMHO) does NOT use this feature internally, otherwise it would never have been allowed to be so buggy; if Apple doesn't use a thing, it's generally not safe to use it either - they aren't good at testing :)

提交回复
热议问题