您的位置:首页 > 大数据 > 人工智能

Unable to simultaneously satisfy constraints

2017-02-21 21:44 836 查看
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 的自动布局约束中修改优先级,如下图

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息