如何在Xcode 7中隐藏警告 [英] How to Hide Warnings in Xcode 7

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

问题描述

是的我知道警告是有用的,不应该被禁用,我通常会纠正所有这些警告,但在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 7中隐藏警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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