为什么我的文件会从xcode的项目导航器中消失?

时间:2023-01-13 20:41:38

The project I'm working on started as a single view application with storyboard, and I've added 2 more view controllers, each with a .m and a .h file. However, every time I save, quit, and then restart, the 4 new files disappear from the project navigator. I have to hit "add files to project" and drag them in manually from the project's folder each time. It's not terribly inconvenient, but it's annoying enough that I've basically just been leaving the project minimized whenever I'm not working on it. Does anyone know what's going on, or how I can force the files to remain in the navigator? This kind of thing has never happened before.

我正在开发的项目是作为带有故事板的单一视图应用程序开始的,我添加了另外两个视图控制器,每个控制器都有一个.m和一个.h文件。但是,每次保存,退出然后重新启动时,4个新文件都会从项目导航器中消失。我必须点击“将文件添加到项目”并每次从项目的文件夹中手动拖动它们。它并不是非常不方便,但它很烦人,我基本上只是在我不工作的时候最小化项目。有谁知道发生了什么,或者我如何强制文件保留在导航器中?这种事从未发生过。

4 个解决方案

#1


42  

there is a button on the filter bar to "show only recent files"; the icon looks like a clock. You need to toggle this button to show all of your files.

过滤条上有一个按钮,“仅显示最近的文件”;图标看起来像一个时钟。您需要切换此按钮以显示所有文件。

#2


5  

There is a button(4th one) on the filter bar- the botton portion of project navigator pane-, where you can toggle between "On/ off " for "Show only files with unsaved changes " . You probably have it "On". click that button and you probably will see the files

过滤器栏上有一个按钮(第4个) - 项目导航器窗格的按钮部分 - 您可以在“打开/关闭”之间切换“仅显示未保存更改的文件”。你可能有“开”。单击该按钮,您可能会看到这些文件

#3


4  

Click on Navigate at the top menu. Then click on "Reveal in Project Navigator."

单击顶部菜单中的导航。然后单击“在Project Navigator中显示”。

#4


4  

You probably are having a filter to show only recent files. To toggle that,

您可能正在使用过滤器来仅显示最近的文件。要切换,

为什么我的文件会从xcode的项目导航器中消失?

#1


42  

there is a button on the filter bar to "show only recent files"; the icon looks like a clock. You need to toggle this button to show all of your files.

过滤条上有一个按钮,“仅显示最近的文件”;图标看起来像一个时钟。您需要切换此按钮以显示所有文件。

#2


5  

There is a button(4th one) on the filter bar- the botton portion of project navigator pane-, where you can toggle between "On/ off " for "Show only files with unsaved changes " . You probably have it "On". click that button and you probably will see the files

过滤器栏上有一个按钮(第4个) - 项目导航器窗格的按钮部分 - 您可以在“打开/关闭”之间切换“仅显示未保存更改的文件”。你可能有“开”。单击该按钮,您可能会看到这些文件

#3


4  

Click on Navigate at the top menu. Then click on "Reveal in Project Navigator."

单击顶部菜单中的导航。然后单击“在Project Navigator中显示”。

#4


4  

You probably are having a filter to show only recent files. To toggle that,

您可能正在使用过滤器来仅显示最近的文件。要切换,

为什么我的文件会从xcode的项目导航器中消失?