From 3d385d3e1123aadb64f9ab640b70e0c06dd9d321 Mon Sep 17 00:00:00 2001 From: xaoxuu Date: Tue, 23 Jun 2020 18:42:08 +0800 Subject: [PATCH] endRotate -> stopRotate --- Source/HUDController.swift | 4 ++-- Source/HUDView.swift | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/HUDController.swift b/Source/HUDController.swift index fdea8b8..1584154 100644 --- a/Source/HUDController.swift +++ b/Source/HUDController.swift @@ -141,10 +141,10 @@ public extension LoadingRotateAnimation { /// 停止旋转 /// - Parameter layer: 图层 - func endRotate(_ layer: CALayer? = nil) { + func stopRotate(_ layer: CALayer? = nil) { DispatchQueue.main.async { self.animateLayer = nil - (layer ?? self.imageView.layer)?.endRotate() + (layer ?? self.imageView.layer)?.stopRotate() NotificationCenter.default.removeObserver(self, name: UIApplication.didEnterBackgroundNotification, object: nil) NotificationCenter.default.removeObserver(self, name: UIApplication.willEnterForegroundNotification, object: nil) } diff --git a/Source/HUDView.swift b/Source/HUDView.swift index e9f488e..6ed57ec 100644 --- a/Source/HUDView.swift +++ b/Source/HUDView.swift @@ -245,8 +245,8 @@ extension CALayer { } } - /// 结束旋转 - func endRotate() { + /// 停止旋转 + func stopRotate() { removeAnimation(forKey: .rotateKey) }