iOS开发——NSIBPrototypingLayoutConstraint原型约束造成的莫名问题

问题描述:

使用Autolayout

从xib加载后代码添加Constraint,xib中没有任何约束,只是创建了n个View并拖了线方便调用

 

在运行过程中产生约束冲突错误,

NSIBPrototypingLayoutConstraint冲突,但是实际上xib中我没有定义任何约束。

 

解决方法:

在获取到xib后立即清除Constraint

 [self.contentView removeConstraints:[self.contentView constraints]];

 

即可。

 

参考来源:

http://book.51cto.com/art/201502/464882.htm

posted @ 2015-04-26 16:37  有奈了  阅读(361)  评论(0编辑  收藏  举报