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

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

Why do my files keep disappearing from xcode's project navigator?

iphonexcodeviewcontroller

提问by classicalpianoguy

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.

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

回答by Hymano

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.

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

回答by Fangming

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

您可能有一个过滤器来仅显示最近的文件。要切换它,

enter image description here

在此处输入图片说明

回答by pylearner

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 个)-项目导航器窗格的底部部分-,您可以在“开/关”之间切换“仅显示具有未保存更改的文件”。你可能把它“开”了。单击该按钮,您可能会看到文件

回答by Rupert

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

单击顶部菜单中的导航。然后单击“在项目导航器中显示”。