说明添加到项目中的文件夹的Xcode设置 [英] Explanation of Xcode settings for folders added to project

查看:196
本文介绍了说明添加到项目中的文件夹的Xcode设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为任何添加的文件夹创建组和为任何添加的文件夹创建文件夹参考有什么区别?

What is the difference between "Create groups for any added folders" and "Create folder references for any added folders"?

我一直在做这个现在的时间,但老实说,我不知道两者之间有什么区别。

I have been doing this for quite some time now, but to be honest I don't know what's the difference between the two.

推荐答案

团体只在你的项目并仅用于组织目的。它们不反映文件系统中的内容,以及文件将被编入应用程序的位置。

Groups are only within your project and are for organization purposes only. They do not reflect what is on the file system nor where the files will be compiled into in the app.

文件夹基本上就像在文件系统中包含一个文件夹,其中如果您在文件夹引用中移动文件,它也将反映在您的项目中。这些文件夹也会在您的应用程序包中反映出来。

Folders are basically like including a folder on the file system, where if you move a file within a folder reference, it will be reflected in your project as well. These folders are also reflected inside your app bundle when its compiled.

我通常使用组。例如,在文件系统上,我将所有的类都放在一个/ Classes文件夹中,但是在我的项目中将它们分成几组,如View Controllers,Custom Views,Data Model等。这些并不是真的需要分开文件系统,但它在项目中很好。

I usually use groups. For example, on the file system I have all my classes in a /Classes folder but have them separated in my project into groups, such as View Controllers, Custom Views, Data Model, etc. These don't really need to be separate in the file system but its nice to have in the project.

有时我会使用文件夹引用,如果组织一旦进入应用程序包就很重要,但这很罕见。此外,当包含可能经常更新的第三方库的文件时,您可以使用文件夹引用,以便在添加到库中时不必记住添加文件。

Sometimes I'll use folder references if it's important for the organization be maintained once it goes to the app bundle, but that is pretty rare. Also, when including files from a third party library that could be updated often, you can use a folder reference so you don't have to remember to add files when they are added to the library.

这篇关于说明添加到项目中的文件夹的Xcode设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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