Unable to simultaneously satisfy constraints

2017-02-21 21:40:32.056084 sinaweibo[23285:492651] [LayoutConstraints] 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.
(
    <NSLayoutConstraint:0x60000028f870 UIView:0x7faf8dc30d60.height == 12   (active)>,
    <NSLayoutConstraint:0x608000291850 UIImageView:0x7faf8dd48e70.height == 34   (active)>,
    <NSLayoutConstraint:0x608000291170 sinaweibo.TGStatusToolBar:0x7faf8dc302c0.height == 35   (active)>,
    <NSLayoutConstraint:0x60000028f820 sinaweibo.TGStatusPictureV:0x7faf8dc30a00.height == 140   (active)>,
    <NSLayoutConstraint:0x608000291d50 V:|-(0)-[UIView:0x7faf8dc30d60]   (active, names: '|':UITableViewCellContentView:0x7faf8dc30bb0 )>,
    <NSLayoutConstraint:0x608000291da0 V:[UIView:0x7faf8dc30d60]-(12)-[UIImageView:0x7faf8dd48e70]   (active)>,
    <NSLayoutConstraint:0x608000291fd0 V:[UIImageView:0x7faf8dd48e70]-(12)-[UILabel:0x7faf8dd4ac70'【微软展示Windows 10 Mobile与梅赛...']   (active)>,
    <NSLayoutConstraint:0x608000292110 V:[UILabel:0x7faf8dd4ac70'【微软展示Windows 10 Mobile与梅赛...']-(0)-[sinaweibo.TGStatusPictureV:0x7faf8dc30a00]   (active)>,
    <NSLayoutConstraint:0x6080002923e0 V:[sinaweibo.TGStatusToolBar:0x7faf8dc302c0]-(0)-|   (active, names: '|':UITableViewCellContentView:0x7faf8dc30bb0 )>,
    <NSLayoutConstraint:0x608000292430 V:[sinaweibo.TGStatusPictureV:0x7faf8dc30a00]-(>=12)-[sinaweibo.TGStatusToolBar:0x7faf8dc302c0]   (active)>,
    <NSLayoutConstraint:0x600000290220 'UIView-Encapsulated-Layout-Height' UITableViewCellContentView:0x7faf8dc30bb0.height == 224.667   (active)>,
)

Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x60000028f820 sinaweibo.TGStatusPictureV:0x7faf8dc30a00.height == 140   (active)>


出现类似上面的错误时,查找最后一句的约束,在XIB 的自动布局约束中修改优先级,如下图


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值