cruisediary / Pastel

🎨 Gradient animation effect like Instagram
MIT License
3.5k stars 185 forks source link

QUESTION: How to put the animation on a continuous loop. #31

Closed jmckosky16 closed 6 years ago

jmckosky16 commented 6 years ago

Hi all,

How would I have the animation on a smooth, continuous loop? Might be something small I'm missing. Thank you.

jmckosky16 commented 6 years ago

putting the code in viewDidLoad made it so the animation would not repeat. However, putting the code in the viewWillAppear solves this issue. (Putting code in viewDidAppear has a split second lag time for the animation to start. Putting the pastel in viewWillAppear seems like the best issue.

kboy-silvergym commented 6 years ago

@jmckosky16 I've faced same issue. And I also resolve this if I put code in viewWillAppear. Thanks!

By the way, README should be fixed so that the code is written in viewWillAppear.