Xcode:项目导航器,黄色文件夹和蓝色文件夹之间的区别 [英] Xcode: project navigator, difference between Yellow folder and blue folder

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

问题描述

我想知道Xcode中蓝色文件夹和黄色文件夹之间的区别.

I want to know the difference between a blue folder and a yellow folder in Xcode.

我发现了,但并没有澄清我的疑问!

I found this but doesn't clarify my doubts!

推荐答案

黄色文件夹是组",它们不是实际的文件夹,而是对文件夹/文件的引用.它们仅用于组织Xcode中的项目.蓝色文件夹是文件系统中存在的实际文件夹.

Yellow folders are "Groups", they are not actual folders but references to folders/files. They exist only to organize your project in Xcode. Blue folders are actual folders existent in the file system.

蓝色文件夹的好处是您不必每次在文件夹中放置新内容(即图像)时都添加文件".但是,您仍应主要使用组(又名黄色文件夹),因为它使您可以更好地控制与应用捆绑在一起的内容(请考虑文件夹/版本文件中的隐藏文件).另外,有时蓝色文件夹可能会使您文件包中的文件层次结构混乱,即.导致启动画面出现故障. 在少数情况下,您将使用蓝色文件夹(例如内容"文件夹),其中文件夹中的任何内容都应与捆绑包一起包装(如Mark Szymczyk所评论的图像或视频).如果不确定,请坚持使用黄色文件夹.

Blue folders give you the benefit of not having to "Add File" everytime something new lands in the folder i.e. an image. However, you should still mostly use groups (aka yellow folders) because it gives you more control on what will be bundled with your app (think of hidden files in the folder/versioning files). Also, sometimes blue folders can mess up your file hierarchy in your bundle, ie. causing the splash screen to malfunction. There are only a few cases where you would use blue folders, like a "content" folder, where anything in the folder should be packed with the bundle (as Mark Szymczyk commented, images or videos). If you're not sure, stick with yellow folders.

这篇关于Xcode:项目导航器,黄色文件夹和蓝色文件夹之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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