在 Xcode 中复制文件

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1894119/
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 19:00:00  来源:igfitidea点击:

Copying files in Xcode

xcodefilecopy

提问by Tycho Pandelaar

I've created some files in Xcode. Now I want to copy some of them. How should I do that?

我在 Xcode 中创建了一些文件。现在我想复制其中的一些。我该怎么做?

Currently, I copy them in Finder & copy those back into Xcode in order to work on them. There must be a better way.

目前,我在 Finder 中复制它们并将它们复制回 Xcode 以便处理它们。一定会有更好的办法。

回答by Bjorn

Right click -> show in finder -> select file in finder -> right click -> select "Duplicate" menu

右键单击-> 在finder 中显示-> 在finder 中选择文件-> 右键单击​​-> 选择“复制”菜单

Edit: Previous answer was wrong, fixed in comments, thus the downvotes. Fixed now though.

编辑:先前的答案是错误的,已在评论中修复,因此被否决了。不过现在修好了。

回答by Tony van der Peet

I think (not on my Mac at the moment so this may be totally wrong) that "Add files to project" has an option for copying the files from their source location. At least, I recall doing this at some stage.

我认为(目前不在我的 Mac 上,所以这可能是完全错误的)“将文件添加到项目”可以选择从源位置复制文件。至少,我记得在某个阶段这样做过。

回答by Will

Go to where it is stored locally. Then you can copy it from there.

转到它在本地存储的位置。然后你可以从那里复制它。

回答by Felix Kling

Do you want to copy them between two projects? If so, open both projects and just drag the files out of the 'Groups & Files' view to the other project.

你想在两个项目之间复制它们吗?如果是这样,打开两个项目,然后将文件从“组和文件”视图拖到另一个项目中。

Or maybe this questionhelps you.

或者这个问题对你有帮助。