MatiBot / MBCircularProgressBar

A circular, animatable & highly customizable progress bar from the Interface Builder (Objective-C)
https://www.cocoacontrols.com/controls/mbcircularprogressbar
MIT License
994 stars 180 forks source link

Animation not working #89

Open nitinlandge opened 3 years ago

nitinlandge commented 3 years ago

UIView.animate(withDuration: 1) { self.yellowView.value = 80 }

hkbk commented 3 years ago

UIView.animate(withDuration: 1) { self.yellowView.value = 80 }

hi, You must put it into main thread for animation. DispatchQueue.main.async { //[.repeat, .curveEaseOut, .autoreverse] UIView.animate(withDuration: 0.5, delay: 0.3, options: [.curveLinear], animations: { self. yellowView.value = 80.0 }, completion: nil) } https://ibb.co/gSxCZY4

nitinlandge commented 3 years ago

Thanks for your reply.

I already added it in main thread and its working properly.

The pod you have made is really helpful and simple to use.

Thank you so much.

On Thu, Jan 14, 2021, 8:55 AM HungNT notifications@github.com wrote:

UIView.animate(withDuration: 1) { self.yellowView.value = 80 }

hi, You must put it into main thread for animation.

DispatchQueue.main.async { //[.repeat, .curveEaseOut, .autoreverse] UIView.animate(withDuration: 0.5, delay: 0.3, options: [.curveLinear], animations: { self. yellowView.value = 80.0 }, completion: nil) }

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/MatiBot/MBCircularProgressBar/issues/89#issuecomment-759900740, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD4FGDXCFJOELB3QZX2G2M3SZZP2LANCNFSM4V7GVMOQ .