diff --git a/Example/Example/Assets.xcassets/ProHUDLoading.imageset/Contents.json b/Example/Example/Assets.xcassets/ProHUDLoading.imageset/Contents.json new file mode 100644 index 0000000..61d30f6 --- /dev/null +++ b/Example/Example/Assets.xcassets/ProHUDLoading.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "矩形@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "矩形@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Example/Example/Assets.xcassets/ProHUDLoading.imageset/矩形@2x.png b/Example/Example/Assets.xcassets/ProHUDLoading.imageset/矩形@2x.png new file mode 100644 index 0000000..a9890d7 Binary files /dev/null and b/Example/Example/Assets.xcassets/ProHUDLoading.imageset/矩形@2x.png differ diff --git a/Example/Example/Assets.xcassets/ProHUDLoading.imageset/矩形@3x.png b/Example/Example/Assets.xcassets/ProHUDLoading.imageset/矩形@3x.png new file mode 100644 index 0000000..8fed210 Binary files /dev/null and b/Example/Example/Assets.xcassets/ProHUDLoading.imageset/矩形@3x.png differ diff --git a/Example/Example/TestAlertVC.swift b/Example/Example/TestAlertVC.swift index 1807fbf..dc7d492 100644 --- a/Example/Example/TestAlertVC.swift +++ b/Example/Example/TestAlertVC.swift @@ -138,7 +138,7 @@ class TestAlertVC: BaseListVC { vm.scene = .loading vm.title = "正在加载" } - a.rotate(direction: .counterclockwise) + a.rotate() } } } diff --git a/Source/HUDView.swift b/Source/HUDView.swift index 3b0320b..80548b7 100644 --- a/Source/HUDView.swift +++ b/Source/HUDView.swift @@ -156,7 +156,7 @@ internal extension UIView { let ani = CABasicAnimation(keyPath: "transform.rotation.z") ani.toValue = direction.rawValue * Double.pi * 2.0 if speed > 0 { - ani.duration = 4 / speed + ani.duration = 2 / speed } ani.repeatDuration = .infinity layer.add(ani, forKey: "rotationAnimation")