Xcode中文件夹和组之间的区别? [英] Difference between folder and group in Xcode?

查看:23
本文介绍了Xcode中文件夹和组之间的区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Xcode中,文件夹和组有什么区别?这些术语是可以互换的还是存在细微差别?

In Xcode, what is the difference between a folder and a group? Are these interchangeable terms or is there a subtle difference?

推荐答案

群组

对于组,Xcode 在项目中存储对每个单独文件的引用.

With groups, Xcode stores in the project a reference to each individual file.

文件夹

文件夹引用更简单.您可以发现文件夹引用,因为它显示为蓝色而不是黄色.

Folder references are simpler. You can spot a folder reference because it shows up in blue instead of yellow.

Xcode 中有两种类型的文件夹:组和文件夹引用.您可以使用组来组织项目中的文件而不影响它们在实际文件系统上的结构.这对代码来说很棒,因为你只会在 Xcode 中处理你的代码.在另一方面,组对于资源文件不是很好.

There are two types of folders in Xcode: groups and folder references. You can use groups to organize files in your project without affecting their structure on the actual file system. This is great for code, because you’re only going to be working with your code in Xcode. On the other hand, groups aren’t very good for resource files.

在任何相当复杂的项目中,您通常会处理数十个(如果不是数百个)资产文件,这些资产将需要由您或您从 Xcode 外部修改和操作一个设计师.将所有资源文件放在一个平面文件夹中是一种灾难的秘诀.这就是文件夹引用的用武之地.它们允许您将文件组织到文件系统上的文件夹中在 Xcode 中保持相同的文件夹结构.

On any reasonably complicated project, you’ll usually be dealing with dozens – if not hundreds – of asset files, and those assets will need to be modified and manipulated from outside of Xcode, either by you or a designer. Putting all of your resource files in one flat folder is a recipe for disaster. This is where folder references come in. They allow you to organize your files into folders on your file system and keep that same folder structure in Xcode.

参考资料

这篇关于Xcode中文件夹和组之间的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆