Storyboard - Unsupported configuration 8 conflicting constrains

余生颓废 提交于 2019-12-10 03:38:45

问题


I am using storyboard autolayout. I am noticing today, while compiling a warning message

MainStoryboard_iphone.storyboard
Unsupported Configuration
8 conflicting constraints

Clicking on warning takes to storyboard, but not to view which is a problem. Is there a way to figure out which view/control has the problem

Thanks


回答1:


Right click on the "8 conflicting constraints" and select "Reveal in log". There should be a line with something like the following in your log:

/path/to/storyboard/Storyboard_iPad.storyboard:8or-pl-jNO: warning: 2 conflicting constraints

The part between the colons between the storyboard path and the warning (8or-pl-jNO in my case) is the ID of the constraint that caused the issue.

To find the constraint, right click on your storyboard file in the project navigator, then Open As -> Source Code, then search for the ID of the constraint. You should then be able to find what View it is contained in in the XML, then you can switch back to Interface Builder (Open As -> Interface Build - iOS Storyboard), then find the view that contained the constraint, and find the constraint that caused the problem. You can select the constraints in the document outline, then check their ID in the Identity Inspector at the right hand side, under the Document section, named Object ID.




回答2:


@Andrew Porritt 's answer not work in my case, I use Xcode 6. The warning reads:

"Unsupported Configuration of constraint attributes. This may product unexpected results at runtime and is not compatible with Xcode versions prior to 5.1"

"Attribute Unavaliable" (e.g. I use preferred max layout width)

I can't open the log file, what I did is open the storyboard file as source code, so the warnings will appear at the corresponding line(just like shown as in the .swift/.m source code)



来源:https://stackoverflow.com/questions/18520765/storyboard-unsupported-configuration-8-conflicting-constrains

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