Open diamondfive opened 3 years ago
原始控件 [self.testLabel mas_makeConstraints:^(MASConstraintMaker *make) { make.left.mas_equalTo(10); make.top.mas_equalTo(200); make.width.mas_equalTo(200); make.height.mas_equalTo(200); }]; 平移动画: [UIView animateWithDuration:5.0f animations:^{
[self.testLabel mas_updateConstraints:^(MASConstraintMaker *make) { make.height.mas_equalTo(100); }]; [self.view layoutIfNeeded]; [self.view.superview layoutIfNeeded]; }];
控件会错位平移
原始控件 [self.testLabel mas_makeConstraints:^(MASConstraintMaker *make) { make.left.mas_equalTo(10); make.top.mas_equalTo(200); make.width.mas_equalTo(200); make.height.mas_equalTo(200); }]; 平移动画: [UIView animateWithDuration:5.0f animations:^{
控件会错位平移