kaandedeoglu / KDCircularProgress

A circular progress view with gradients written in Swift
MIT License
1.21k stars 217 forks source link

Could not generate continuous animation. #31

Closed suhaskr closed 8 years ago

suhaskr commented 8 years ago

Hi, My intent is to generate animation from 0-360 degree continuously. I tried to generate it using the following functions.

@IBAction func progressButtonTapped(sender: UIButton) { continuousAnimation() }

func continuousAnimation() { circularProgressView.animateFromAngle(0, toAngle: 360, duration: 5) { (completed) in if completed { self.continuousAnimation() print("completed = (completed)") } else { print ("completed = (completed)") } } }

But the issue is that, only the first time the completion block gets executed and the animation runs twice. But after that the completion block never gets executed and there are no print statements. I am not sure if there is an error with my code, any suggestions are welcomed.

kaandedeoglu commented 8 years ago

this was a bug on my part. Thank you for pointing it out 👍 I just pushed version 1.4.1, I hope this resolves the issues.