Disable storyboard warnings

柔情痞子 提交于 2019-12-10 14:45:50

问题


I avoid getting warnings in my swift code. However when it comes to storyboard requirements it's a bit harder for me.

So for now i just want to disable xcode showing warnings regarding storyboard issues.

I have tried the following without success:


回答1:


Disable show warnings option

As you have mentioned the option Show warnings under Interface Builder Storyboard Compiler -Options must be kept no, for suppressing warnings related to your storyboard.

What you missing to do

Also after that you can enable and disable this option from right bottom position of warnings tab in Issue navigator.

Example:

That way you can toggle easily.




回答2:


If you just want to hide warnings for storyboard, it looks like you've done it correctly. However, you do need to restart Xcode for the updated preferences to take effect.

If that doesn't work, you can also try this:

Navigate to build settings and go to the Compile Sources phase. Double-click in the Compiler Flags column for the storyboard and enter -w to turn off all warnings for that file.



来源:https://stackoverflow.com/questions/45559267/disable-storyboard-warnings

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!