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) }