自适应布局问题

2016-06-14  本文已影响0人  嘻嘻来打我

Unable to simultaneously satisfy constraints.

Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it.

今天自定义tableViewCell时遇到一个上面这样的问题,console控制台打印上面的提示!

原因是 :cell中有一个UIImageView 控件在设置了固定的上下边距的同时 也设定了该控件的宽高度!

我的解决方法:在设置了控件上下边距的时候 不要设置该控件的高度

上一篇下一篇

猜你喜欢

热点阅读