Xcode - 如何将粘贴类/文件从一个项目复制到另一个项目?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6821057/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 21:33:52  来源:igfitidea点击:

Xcode - How could you copy paste classes / files from one project into another?

xcode

提问by Suchi

Copy pasting files in finder works, but I cannot view them in xcode. I am an xcode newbie, so pardon me if its a noob question.

在 finder 中复制粘贴文件有效,但我无法在 xcode 中查看它们。我是一个 xcode 新手,如果这是一个菜鸟问题,请原谅我。

回答by iandotkelly

The project navagator in XCode with the folders and files has nothing to do with what files are in your project folder in Finder. You will see that the navigator contains 'folders' that do not even exist in the directory on the Mac.

XCode 中带有文件夹和文件的项目导航器与 Finder 中项目文件夹中的文件无关。您将看到导航器包含在 Mac 上的目录中甚至不存在的“文件夹”。

Once you've dropped the files into the project directory, you need to add them to the project. Right click the folder in the navigator you would like the files to go into, and select "add files to 'your project name'"

将文件放入项目目录后,您需要将它们添加到项目中。在导航器中右键单击您希望文件进入的文件夹,然后选择“将文件添加到‘您的项目名称’”

Alternatively you can drag files from one Xcode project to another in the navigator.

或者,您可以在导航器中将文件从一个 Xcode 项目拖到另一个项目。

Hope this helps.

希望这可以帮助。