Uitableview UIImageView无法使用AutoLayout在UITableiViewCell中自动调整大小

Uitableview UIImageView无法使用AutoLayout在UITableiViewCell中自动调整大小,uitableview,uiimageview,autolayout,Uitableview,Uiimageview,Autolayout,调试信息列表如下所示: 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

调试信息列表如下所示:

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. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints) 
(
    "<NSLayoutConstraint:0x170c5d50 V:[UIImageView:0x170c5ca0(87)]>",
    "<NSLayoutConstraint:0x170c5f70 UIImageView:0x170c5b60.top == UIImageView:0x170c5900.top>",
    "<NSLayoutConstraint:0x170c6000 UIImageView:0x170c5ca0.top == UIImageView:0x170c5b60.top + 10>",
    "<NSLayoutConstraint:0x170c6030 V:[UIImageView:0x170c5ca0]-(18)-|   (Names: '|':UITableViewCellContentView:0x170c5400 )>",
    "<NSLayoutConstraint:0x170c60f0 V:|-(15)-[UIImageView:0x170c5900]   (Names: '|':UITableViewCellContentView:0x170c5400 )>",
    "<NSAutoresizingMaskLayoutConstraint:0x170c6bd0 h=--& v=--& V:[UITableViewCellContentView:0x170c5400(131)]>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x170c5d50 V:[UIImageView:0x170c5ca0(87)]>

Break on objc_exception_throw to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.

无法同时满足约束。
可能下面列表中至少有一个约束是您不想要的。试着这样做:(1)看看每个约束,试着找出你不期望的约束;(2) 找到添加了不需要的约束的代码,然后修复它。(注意:如果您看到不理解的NSAutoresizingMaskLayoutConstraints,请参阅UIView属性TranslatesAutoResizingMaskToConstraints的文档)
(
"",
"",
"",
"",
"",
""
)
将尝试通过打破约束进行恢复
在objc_异常_抛出时中断,以便在调试器中捕获该异常。
中列出的UIView上UIConstraintBasedLayoutDebugging类别中的方法也可能会有所帮助。
我正在做一个聊天功能。外部图像视图是背景,内部是用户发送的聊天图像。内部从四面固定到外部,底部固定到contentView,用于自动调整单元格大小。同时,在故事板中设置宽度和高度约束以及Inner imageview的模式是aspectfit。这就是条件:


我的问题是调试日志说高度不能应用,为什么?是否无法在自动布局中修改UIImageView的高度?非常感谢,感谢您的申请。

无法同时满足约束。
这意味着您已经在代码或IB中的某个地方设置了两次约束。您介意显示故事板的屏幕截图吗?我想发布一张图像。但我在stackoverflow上的声誉不够好。Sorroy只需发布链接,我会将其转化为您的图像。请在编辑问题时告诉我。好的。这是链接,好的,接受我的编辑,在您的帖子中显示这些图像。