在同一个view 中添加两个及以上label 且每个label都自适应,其实就是使用 lessThanOrEqureTo
[lab1 mas_remakeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.mas_left).offset(FixGap(12));
make.top.equalTo(@100);
}];
[lab2 mas_remakeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(lab1.mas_right).offset(FixGap(12));
make.centerY.equalTo(lab1);
make.right.lessThanOrEqualTo(self.mas_right).offset(-10);// !!! 关键是这一句
}];