Masonry布局“Unable to simultaneously satisfy constraints”

2018/12/9 posted in  iOS

出现这个问题是设置约束优先级错误,设置一下约束的优先级就行。

[self.doctorTitle mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.title.mas_left);
            make.right.equalTo(self.title.mas_right);
            make.top.equalTo(self.topline.mas_bottom).offset(10).priorityHigh();
            make.height.mas_equalTo(@14);
}];