标签:
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 当需要把某个控件进行隐藏的时候有警告的解决方案
标签:
原文地址:http://www.cnblogs.com/machao/p/4619222.html