How to Hide Warnings in Xcode

后端 未结 4 1607
忘掉有多难
忘掉有多难 2020-12-29 02:17

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 w

相关标签:
4条回答
  • 2020-12-29 02:36

    In Xcode 8, you can hide the warning's messages in the editor by

    Editor - Issues - (Select) Errors only or completely show/hide errors and warnings using "Hide All Issues" or use shortcut Ctrl + Cmd + M

    0 讨论(0)
  • 2020-12-29 02:49

    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:

    0 讨论(0)
  • 2020-12-29 02:49

    First of all, it's a really bad idea: warnings exist for a reason, you really should check each of them.

    There are few ways to try.

    1. Select Target -> select Build settings search as Warnings

    Here you can change the Selected warnings to NO by selecting the dropdown.

    1. If you want to hide Objective c warnings follow the second image.

    1. If you want to hide Storyboard and XIBs warnings see the below image.

    1. If you want to hide Assets warning see the below image.

    I hope this may help you :)

    0 讨论(0)
  • 2020-12-29 02:58

    Select your project and select your target and show Build Phases. Search the name of the file in which you want to hide, and you should see it listed in the Compile Sources phase. Double-click in the Compiler Flags column for that file and enter -w to turn off all warnings for that file. Hope it will help you.

    0 讨论(0)
提交回复
热议问题