14

I often add the constraints in code and the warnings are useless. I am looking for a way to effectively hide warnings for storyboards.

The following solution is unfortunately unsuccessful:

Select Project Build Settings -> Interface Builder XIB Compiler - Options -> Show Warnings -> set to „NO"

Select Project Build Settings -> Interface Builder Storyboard Compiler - Options -> Show Warnings -> set to „NO"

enter image description here

This does not work!

I have cleaned my project and restarted Xcode, but the warnings (for example Ambiguous Layout: Scrollable content size is ambiguous for „scrollView”) continue to appear.

Community
  • 1
  • 1
David Silva
  • 1,939
  • 7
  • 28
  • 60
  • In Xcode's Size Inspector, there's an "Ambiguity" pop-up button, at the very bottom, which you can set to "Never Verify." You'll have to do this for each UI element in question, but you might be able to silence a lot of the warnings this way. Does this help? – Charles Srstka Oct 18 '17 at 17:40
  • 3
    Are you sure that this is a good way to set constraints in code and use storyboards same time? What's a point? Why using constraints in code better if you already have an interface in the interface builder? If you need to change constraints in code, you can make an Outlet too. Or just not use storyboards. – Woof Oct 19 '17 at 02:06

1 Answers1

4

These warnings are kept for a reason. As Woof said in comments, its not fair looking a way to hide the warnings.

For hiding warnings from your Issue Inspector you could have used the answer i have posted here

enter image description here

Saranjith
  • 11,242
  • 5
  • 69
  • 122
  • 1
    Ya correct, you are supposed to resolve them. If you didn't do so your views might have some ambiguity. It won't look proper on different screen sizes. – Anirudha Mahale Oct 23 '17 at 04:11