文本搜索虽然Xcode中的所有.xib文件? [英] Text search though all .xib files in Xcode?

查看:349
本文介绍了文本搜索虽然Xcode中的所有.xib文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



在Xcode中,如何执行文本搜索(XML内容)例如,我们的所有.xib文件都在第二行包含这个字符串: com.apple .InterfaceBuilder3.CocoaTouch.XIB 。所以我认为搜索该字符串的所有项目文件将返回所有.xib文件,但Xcode坚持0次发生。我仔细检查过Project Find Options看起来是否正确。



我一定会漏掉一些明显的东西。 (或Xcode以某种方式硬编码以跳过.xib文件。)



我试图找到引用特定类的所有.xib文件(以及文本搜索似乎是最直接的方式)。



谢谢!

解决方案

我所做的是在终端运行grep:

  grep -i -r --include = *。xibTextToFindHere/ PathToSearchHere 

Xcode似乎没有搜索xib文件的选项,我试图让Spotlight看看他们已经不成功。

This seems like such a basic task, but I'm stumped.

How, in Xcode, do you execute a textual search though (the XML contents of) all the .xib files in a project?

For example, all of our .xib files contain this string on the second line: com.apple.InterfaceBuilder3.CocoaTouch.XIB. So I'd think that searching all project files for that string would return all .xib files, but Xcode insists "0 occurrences". I've double checked that the Project Find Options look correct.

I must be missing something obvious. (Or Xcode is somehow hard-coded to skip .xib files.)

I'm trying to find all the .xib files that reference a particular class (and a text search seems like the most direct way).

Thanks!

解决方案

What I do is run grep in terminal:

grep -i -r --include=*.xib "TextToFindHere" /PathToSearchHere

Xcode doesn't seem to have an option to search xib files and my attempts to get Spotlight to look at them have been unsuccessful.

这篇关于文本搜索虽然Xcode中的所有.xib文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆