rounak / RJImageLoader

A recreation of the image loader animation created by Michael Villar for iOS
MIT License
833 stars 89 forks source link

Fixed flicker on animation completion #5

Closed jbttn closed 9 years ago

jbttn commented 9 years ago

For some reason the path did not seem to be updated when set to the new path inside the transaction block. The flicker that is seen is actually the mask showing up with the old path right before the mask is set to nil in the animation completion delegate. There is a timing issue where the mask can still show up for a split second right before the mask is set to nil. The solution I've come up with is to ensure the the animations are not removed on completion and to remove them manually AFTER the mask is set to nil. I'm not sure if this is the best solution for this problem, but it does fix the flicker.

ParsifalC commented 9 years ago

thx.it works.

rounak commented 9 years ago

Thanks for the PR @jbttn. Can you add a comment around these lines to say that we'll remove the animation manually later, to fix a weird flicker?

groupAnimation.removedOnCompletion = NO;
groupAnimation.duration = 1;
jbttn commented 9 years ago

I have added the comment

rounak commented 9 years ago

Thanks @jbttn, merged!

rounak commented 9 years ago

Hey @jbttn if you want to list your name in the contributors section of the readme, send me a PR.