故事板 - 不支持的配置8个冲突的约束 [英] Storyboard - Unsupported configuration 8 conflicting constrains

查看:83
本文介绍了故事板 - 不支持的配置8个冲突的约束的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用storyboard autolayout。我今天注意到,在编译警告消息时

  MainStoryboard_iphone.storyboard 
不支持的配置
8冲突的约束

点击警告进入故事板,但不查看哪个是问题。有没有办法弄清楚哪个视图/控件有问题



谢谢

解决方案

右键单击8个冲突约束并选择显示日志。在日志中应该有类似以下内容的行:



/path/to/storyboard/Storyboard_iPad.storyboard:8or-pl-jNO:警告:2冲突约束



故事板路径和警告之间的冒号之间的部分(在我的情况下是8or-pl-jNO)是导致问题的约束的ID。 / p>

要查找约束,请右键单击项目导航器中的storyboard文件,然后单击Open As - > Source Code,然后搜索约束的ID。然后,您应该能够在XML中找到它包含的View,然后您可以切换回Interface Builder(打开为 - >界面构建 - iOS故事板),然后找到包含约束的视图,并找到约束那导致了这个问题。您可以在文档大纲中选择约束,然后在文档部分右侧的Identity Inspector中检查其ID,名为Object ID。


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

解决方案

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.

这篇关于故事板 - 不支持的配置8个冲突的约束的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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