UI

UIView animateWithDuration 中使用Ma

2020-12-18  本文已影响0人  Stormstout
[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];
上一篇下一篇

猜你喜欢

热点阅读