UIView animateWithDuration 中使用Masonry约束 动画不生效

[UIView animateWithDuration: 0.5 animations: ^{
    [self.SliderView mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.centerX.mas_equalTo(self.ReadyAppointmentBtn.mas_centerX);
        make.top.mas_equalTo(self.ReadyAppointmentBtn.mas_bottom).offset(0);
        make.width.offset(40);
        make.height.offset(4);
    }];
    ///告知父类控件绘制,不添加这行的代码动画将不生效
    [self.SliderView.superview layoutIfNeeded];
} completion: nil];

你可能感兴趣的:(UIView animateWithDuration 中使用Masonry约束 动画不生效)