標籤:
1 //查看全文2 [self.moreBtn mas_makeConstraints:^(MASConstraintMaker *make) {3 make.top.equalTo (self.contentLabel.mas_bottom).with.offset (5);4 make.left.equalTo (self.contentView).with.offset (10);5 make.width.mas_equalTo (@60).priorityLow();6 make.height.mas_equalTo (@25).priorityLow();7 }];
使用例子
如果(需要隱藏){
//查看全文 [self.moreBtn mas_makeConstraints:^(MASConstraintMaker *make) { make.top.equalTo (self.contentLabel.mas_bottom).with.offset (5); make.left.equalTo (self.contentView).with.offset (10); make.width.mas_equalTo (@60).priorityLow(); make.height.mas_equalTo (@25).priorityLow(); }];
}else (不需要){
//查看全文 [self.moreBtn mas_makeConstraints:^(MASConstraintMaker *make) { make.top.equalTo (self.contentLabel.mas_bottom).with.offset (5); make.left.equalTo (self.contentView).with.offset (10); make.width.mas_equalTo (@0).priorityHigh(); make.height.mas_equalTo (@0).priorityHigh(); }];
}
Masonry 當需要把某個控制項進行隱藏的時候有警告的解決方案