Hey guys! In this challenge everything is working perfect at first. The clouds were running good. But if I clicked home button and then came back. The positions of all the clouds were reset and started animation from the left side(right picture).
I tested it. It seems if I clicked home button and go back to home page, the animation function: animateCloud(){…} will automatically complete. So all the cloud’s frame are reset in the completion block.
I’m wondering if there any ways to keep the cloud animation running when I click home button? Thank you!
update: Core animation stops working after… | Apple Developer Forums
it says: “When your application goes into the background, all animations are removed from all layers. You will have to re-establish these animations each time you come to the foreground.”