kaandedeoglu / KDCircularProgress

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

return progress bar to initial position #56

Closed abara-kedavra closed 7 years ago

abara-kedavra commented 7 years ago

Hi, kaandedeoglu! Thank you for KDCircularProgress. Initially I have green progress bar. When I tap the button, green progress starts to disappear and black track appears. At finish I have only black track. If I tap the button again, green progress appears and starts to disappear again. I need to see green bar before I tap the button, right after the end of the animation. Is it possible to add something to "if completed { }" to return progress bar to initial position?

screen shot 2016-12-08 at 20 27 14 screen shot 2016-12-08 at 20 27 55

kaandedeoglu commented 7 years ago

maybe you can try to set the angle to the correct value in the completion block if the completed argument is true.

abara-kedavra commented 7 years ago

I tried to add "self.progress.angle = " to "if completed", but it didn't work. When I add "progress.angle = " to other place after other action - it started to work. And it only works if I have this code in two places (both of this strings). It's strange, but it works. Thank you.

philmodin commented 4 years ago

I'm having an issue with the completion on animate. It returns false until I run animate again. Is this intended? Expected it to run the completion after animating and returning true without having to rerun.