如何在Xcode中隐藏警告

如何在Xcode中隐藏警告

本文介绍了如何在Xcode中隐藏警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是的,我知道警告是有用的,不应禁用警告,我通常会更正所有警告,但是在XCode中,它们与我的代码混杂在一起,让我感到不安.我想在不时且不时需要的时候看到警告!

Yes I know that warnings are useful and should not be disabled and I usually correct all of them, but in XCode they mingle with my code and get on my nerves. I want to see warnings when I need them not all the time and in my face!

我为Swift所显示的警告打勾了,因为它们一直在改变语言的构造!他们现在已经废弃了for循环(我从未听说过可以更改其最基本构造的语言,但我想Apple可以摆脱任何限制),现在我的代码中每一个都嵌入了警告.

I'm ticked by the warnings displayed for Swift since they change the language constructs all the time! They have now obsoleted the for loop (I have never heard of a language that changes it's most basic constructs, but I suppose Apple could get away with anything) and now I get warnings embedded in my code every were.

如果警告在我进行编译时不会在代码中扩展,那就更好了,因此如果需要,我可以手动扩展它们.是否可以在不禁用设置的情况下实现?

It will be much better if the warnings would not expand in my code when I do a compile so I can expand them manually if I need them. Is this possible without disabling them in settings?

推荐答案

我不知道Xcode 7上是否有此选项,但是在Xcode 8中,只需单击左侧底部的此图标(蓝色图标),然后它只会过滤错误:

I don't know if there are this option on Xcode 7, but in Xcode 8 just click at this icon on bottom at left side (blue icon) and it will filter only errors:

这篇关于如何在Xcode中隐藏警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-05 10:19