在Xcode项目中保留未使用的文件

时间:2022-10-30 22:50:16

In Eclipse you can create a folder and name it, say, "unused", to keep currently unused files (incomplete code, resources for future use, etc) which are ignored by project builder. Can I have something similar with Xcode?

在Eclipse中,您可以创建一个文件夹并将其命名为“unused”,以保留项目构建器忽略的当前未使用的文件(不完整的代码,将来使用的资源等)。我能和Xcode有类似的东西吗?

If I move a file to a project folder without inserting it with Xcode, it may be OK, and I will be able to see it while opening in Finder. However, it will be more convenient to have it listed by Project Navigator.

如果我将文件移动到项目文件夹而不用Xcode插入它,它可能没问题,我可以在Finder中打开时看到它。但是,通过Project Navigator列出它会更方便。

1 个解决方案

#1


As far as I am concerned, it's not possible. Though, you can comment all of your code in one click to momentarily disable it.

就我而言,这是不可能的。但是,您只需单击一下即可对所有代码进行注释,以暂时禁用它。

  1. Press command + A;
  2. 按命令+ A;

  3. Right click and select Comment Selection.
  4. 右键单击并选择“注释选择”。

#1


As far as I am concerned, it's not possible. Though, you can comment all of your code in one click to momentarily disable it.

就我而言,这是不可能的。但是,您只需单击一下即可对所有代码进行注释,以暂时禁用它。

  1. Press command + A;
  2. 按命令+ A;

  3. Right click and select Comment Selection.
  4. 右键单击并选择“注释选择”。