1 //View Full Text2[Self.morebtn mas_makeconstraints:^ (Masconstraintmaker *Make ) {3Make.top.equalTo (Self.contentLabel.mas_bottom). With.offset (5);4Make.left.equalTo (Self.contentview). With.offset (Ten);5Make.width.mas_equalTo (@ -). Prioritylow ();6Make.height.mas_equalTo (@ -). Prioritylow ();7}];
Examples of Use
if (need to hide) {
// View full text [Self.morebtn mas_makeconstraints:^ (Masconstraintmaker * make) { Make.top.equalTo (self.contentLabel.mas_ Bottom). With.offset (5); Make.left.equalTo (Self.contentview). With.offset (); Make.width.mas_equalTo (@). Prioritylow (); Make.height.mas_equalTo (@). Prioritylow (); }];
}else (not required) {
// View Full Text [self.morebtn mas_makeconstraints:^ (Masconstraintmaker * Make) { Make.top.equalTo ( Self.contentLabel.mas_bottom). With.offset (5); Make.left.equalTo (Self.contentview). With.offset (); Make.width.mas_equalTo (@0). Priorityhigh (); Make.height.mas_equalTo (@0). Priorityhigh (); }];
}
Masonry a warning solution when a control needs to be hidden