约束动画 一直出不来
正确的姿势
- (void)testViewAnimate { [self.testView mas_updateConstraints:^(MASConstraintMaker *make) { make.height.mas_equalTo(self.height - 40 - 50); }]; [UIView animateWithDuration:1 animations:^{ [self.testView.superview layoutIfNeeded]; }]; }
必须是 superview 调用 layoutIfNeeded
第二种正确姿势: 改frame
- (void)testViewAnimate { [UIView animateWithDuration:1 animations:^{ self.testView.height = self.height - 40 - 50; }]; }