diff --git a/Source/Alert/AlertConfig.swift b/Source/Alert/AlertConfig.swift index 8eed99d..487f187 100644 --- a/Source/Alert/AlertConfig.swift +++ b/Source/Alert/AlertConfig.swift @@ -126,7 +126,8 @@ fileprivate var privUpdateImage: (ProHUD.Alert) -> Void = { mk.width.equalTo(config.iconSize.width) mk.height.equalTo(config.iconSize.height) } - vc.imageView.layer.removeAllAnimations() + // 移除动画 + vc.stopRotate(vc.animateLayer) vc.animateLayer = nil vc.animation = nil diff --git a/Source/Toast/ToastConfig.swift b/Source/Toast/ToastConfig.swift index f8f3421..f3d7f46 100644 --- a/Source/Toast/ToastConfig.swift +++ b/Source/Toast/ToastConfig.swift @@ -116,12 +116,18 @@ fileprivate var privReloadData: (ProHUD.Toast) -> Void = { // 设置持续时间 vc.vm.updateDuration() + // 移除动画 + vc.stopRotate(vc.animateLayer) + vc.animateLayer = nil + vc.animation = nil + + // 移除进度 + vc.progressView?.removeFromSuperview() + // id 包含 .rotate 的会自动旋转 if vc.vm.scene.identifier.contains(".rotate") { vc.startRotate() } - // 移除进度 - vc.progressView?.removeFromSuperview() }