Commit 0d5f02a7 authored by pete谢兆麟's avatar pete谢兆麟

去除动画效果

parent 0735a8d2
...@@ -54,6 +54,9 @@ class YHProgressView: UIView { ...@@ -54,6 +54,9 @@ class YHProgressView: UIView {
} }
func setProgress(_ progress: Float, animated: Bool) { func setProgress(_ progress: Float, animated: Bool) {
CATransaction.begin()
CATransaction.setDisableActions(true)
progressLayer.strokeEnd = CGFloat(progress) progressLayer.strokeEnd = CGFloat(progress)
CATransaction.commit()
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment