From 76fdad3289dc99f6483bd7d36fa37a0f35dfd042 Mon Sep 17 00:00:00 2001 From: xaoxuu Date: Wed, 24 Jun 2020 11:28:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=97=B6=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E5=8A=A8=E7=94=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/Alert/AlertConfig.swift | 3 ++- Source/Toast/ToastConfig.swift | 10 ++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) 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() }