mirror of https://github.com/xaoxuu/ProHUD
endRotate -> stopRotate
This commit is contained in:
parent
f0e6cb2fda
commit
3d385d3e11
|
@ -141,10 +141,10 @@ public extension LoadingRotateAnimation {
|
||||||
|
|
||||||
/// 停止旋转
|
/// 停止旋转
|
||||||
/// - Parameter layer: 图层
|
/// - Parameter layer: 图层
|
||||||
func endRotate(_ layer: CALayer? = nil) {
|
func stopRotate(_ layer: CALayer? = nil) {
|
||||||
DispatchQueue.main.async {
|
DispatchQueue.main.async {
|
||||||
self.animateLayer = nil
|
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.didEnterBackgroundNotification, object: nil)
|
||||||
NotificationCenter.default.removeObserver(self, name: UIApplication.willEnterForegroundNotification, object: nil)
|
NotificationCenter.default.removeObserver(self, name: UIApplication.willEnterForegroundNotification, object: nil)
|
||||||
}
|
}
|
||||||
|
|
|
@ -245,8 +245,8 @@ extension CALayer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 结束旋转
|
/// 停止旋转
|
||||||
func endRotate() {
|
func stopRotate() {
|
||||||
removeAnimation(forKey: .rotateKey)
|
removeAnimation(forKey: .rotateKey)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue