nikola9core / DottedProgressBar

Simple and powerful animated progress bar with dots
MIT License
43 stars 16 forks source link

Issue going back to zero progress. #2

Open stewartboyd119 opened 7 years ago

stewartboyd119 commented 7 years ago

While using a hacked up version of your code to mimic the dots used in passcode entry, I was trying to set the progress back to zero. This lead to an invalid state. I believe there might be times where a progress bar (not just my hacky use case) would need to return back to zero progress. I think updating line 161 to be "if nextAnimation.value >= 0" would fix this issue (instead of > 0).

image

yashbedi commented 6 years ago

Hello, Thanks for this wonderful library,

I'm clearly not using any hacked up versions of Dotted Progress Bar.. Only problem I've is : How to set the progress bar BACK to zero, Once the progress is done ? I tried with : self.progressBar.setProgress(0, animated: true) it didn't worked.

Then by removing it from the superview and re-adding (it with all the same configurations ) worked. But thats not the appropriate solution.

Any help is appreciated.. 🙏🏻

poojab commented 5 years ago

@yashbedi have you got any fix? I am facing issue as I have to set progress back to 0 on some event.

yashbedi commented 5 years ago

Hey @poojab, We removed the library.!

poojab commented 5 years ago

Ohh okay. but what is other solution for such progress bar?

yashbedi commented 5 years ago

By removing it from the superview and re-adding (it with all the same configurations ) worked. But thats not the appropriate solution. Handling all programmatically.