I’ve tried the challenge in Chapter 9 to move the clouds. But once the cloud initially finishes the animation and when I try to reset it, the cloud will flash real quick where it was originally in the view and then start where it’s supposed to.
I’ve checked the solution provided but it does the same thing as mine. Has anyone else noticed this? I can’t seem to figure out how to solve this.
Edit:
Well one way to fix it I found was to add these two lines of code to “animateCloud(layer: CALayer)”
cloudMove.fillMode = kCAFillModeForwards
cloudMove.isRemovedOnCompletion = false
But I’d prefer not to use isRemovedOnCompletion for performance reasons. Not sure if there’s a better way though.
Thanks,
Eric