Marxon13 / M13ProgressSuite

A suite containing many tools to display progress information on iOS.
3.93k stars 526 forks source link

ProgressViewRing does not remove the progress path when performAction is set to Success. #64

Open timkettering opened 9 years ago

timkettering commented 9 years ago

I've noticed when I render a ring (for example a download), and the download completes and then I update the ring with performAction = success, then the check is drawn, but the progress ring remains where it is. i have other cells with the ring which immediately show the success, and those have no progress path drawn, and look thinner.

In M13ProgressViewRing.m in the function drawSuccess - if I add a line like this: [_progressLayer removeFromSuperlayer];

Then the progress ring is removed and things look consistent. I am posting this issue to see if the design intent was not to update the progress ring path.

timkettering commented 9 years ago

Nevermind the solution I posted above. It works the first time used, but it also prevents the progress bar from being drawn again, since the layer is gone.

This probably isn't a big deal in typical view usage, but when using the ring view in UITextViewCells, the ring is recycled and we see inconsistent results when cells are reused because not all values are reset.