美文网首页UI
UIView animateWithDuration 中使用Ma

UIView animateWithDuration 中使用Ma

作者: Stormstout | 来源:发表于2020-12-18 13:57 被阅读0次
    [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 中使用Ma

        本文链接:https://www.haomeiwen.com/subject/rkwxnktx.html