简体   繁体   English

Xcode如何知道要在项目导航器中显示哪些文件?

[英]How does Xcode know which files to display in the project navigator?

I have a file that's in my filesystem and in my pbxproj, but when I try to show it in the navigator, the file can't be found. 我的文件系统和pbxproj中都有一个文件,但是当我尝试在导航器中显示该文件时,找不到该文件。 Also, files using its methods give the "method not found" error. 同样,使用其方法的文件也会出现“找不到方法”错误。

what kind of file is it? 什么样的文件? a .m or .h file? .m或.h文件?

If you can't find it in the navigator, try using the search field which is at the bottom of the list of files and folders. 如果在导航器中找不到它,请尝试使用文件和文件夹列表底部的搜索字段。 It looks like this: 看起来像这样:

使用搜索字段

If that doesn't work, open up the Target's Build Phases and look at the list of files to be compiled, like below. 如果那不起作用,请打开目标的构建阶段,然后查看要编译的文件列表,如下所示。

在项目浏览器中显示 Holding down the command key while clicking on the file you want will bring up a contextual menu with a "Show In Project Navigator". 在想要的文件上单击时,按住Command键将弹出带有“在项目浏览器中显示”的上下文菜单。

If you don't see the file when looking at the list of files to compile, chances are pretty good you simply need to add the file to the project. 如果在查看要编译的文件列表时没有看到该文件,则很有可能只需文件添加到项目中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM