lightdesign / LDProgressView

[Stale] A flat or gradient progress view with a simple color setter and customizable options written in pure Core Graphics
MIT License
368 stars 55 forks source link

Bug - endless loop #20

Closed sergiogiro6 closed 9 years ago

sergiogiro6 commented 10 years ago

Hi, i find a endless loop. It's always call the drawRect because you don't invalidate the timer. To fix that i think that you need to invalidate timer in the method: - (void)incrementAnimatingProgress after [self.animationTimer invalidate]; you need to [self.timer invalidate].

Regards,

Sergio

rcdilorenzo commented 9 years ago

I just looked at this and the timer seems necessary if the animation flag is YES.

rcdilorenzo commented 9 years ago

Let me know if you are seeing unexpected behavior. For now, I'll close the issue.

vincentnock commented 9 years ago

I think there is a problem with the interpretation of animate You seem to use the same variable to choose to animate the progress bar with the animationTimer AND the stripes with the timer.

So, if the stripes are unwanted, the self.timer is unnecessarily called, and should never trigger.

rcdilorenzo commented 9 years ago

@vincentnock, would you mind creating an issue called "Unnecessary timer call" with this description? Thanks for the catch here.

vincentnock commented 9 years ago

@rcdilorenzo done !