且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在 Xcode 中创建组与创建文件夹引用

更新时间:2021-11-23 01:34:39

任何 Xcode 项目结构组织有两种类型:

There are two types of any Xcode project structure organization:

  • 文件系统项目结构(使用Finder.app检查)
  • IDE 项目结构(可使用 Xcode 导航器区域中的 Project Navigator 检查.)
  • filesystem project structure (inspectable with Finder.app)
  • IDE project structure (inspectable with Project Navigator in Xcode's navigator area.)

Xcode 通过保留对物理"文件或文件夹的引用来依赖文件系统组织.这就是为什么您可能将项目的所有类、图像、plist 和其他部分存储在同一个 文件夹 中,同时对这些部分的引用保持井井有条进入 Xcode 项目中各自的.

Xcode relies on filesystem organization by keeping a reference to a "physical" file or folder. That is why you may have all the classes, images, plists, and other parts of your projects stored in the same folder, while the references to these parts are being kept organized into respective groups within Xcode project.

当你创建一个组时,它会影响你的项目在 Xcode 中的组织.当您使用引用文件夹创建组时,它会同时创建 Xcode 项目中的组和文件系统中的文件夹.

When you create a group, it affects the organization of your project in Xcode. When you create a group with a reference folder, it creates both, a group in Xcode project and a folder in your filesystem.

然而,由于 Xcode 9 看来,Apple 强制文件系统项目结构与 Xcode 项目结构相对应.这意味着,您必须明确选择没有文件夹的新组"

However, since Xcode 9 it seems like, Apple enforces filesystem project structure to correspond to Xcode project structure. It means, that you explicitly has to choose "New Group without Folder"