如何禁用NSLog? [英] How do I disable NSLog?
本文介绍了如何禁用NSLog?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在Xcode中执行以下操作:
I'd like to do the following in Xcode:
找到所有不带注释的NSLog命令,并将其替换为//NSLog ...
Find all NSLog commands without comments, and replace it with //NSLog...
换句话说,我想评论所有NSLog调用.这可能吗?有没有简单的方法可以做到这一点?
In other words, I want to comment all NSLog calls. Is this possible? Is there an easy way to do this?
推荐答案
更新:
下面的答案实际上要好得多.参见此处.
The answer bellow is actually much better. See here.
初始答案:
Initial answer:
您可以采取一些技巧.搜索所有NSLog
并将其替换为//NSLog
,然后再次搜索////NSLog
并将其替换为//NSLog
.
There is a little hack that you could do. Search for all NSLog
and replace them with //NSLog
and than do another search for ////NSLog
and replace them with //NSLog
.
这篇关于如何禁用NSLog?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文