cruisediary / Pastel

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

WORKAROUND: Animation stops when another view controller is presented #51

Open VatanaChhorn opened 3 years ago

VatanaChhorn commented 3 years ago

For those who are still having these issues, and looking for an approach to it, I highly recommend using Hero for the transition between view controllers instead of the default one.

From the Hero documentation

"It won't modify any of your views' states other than hiding them during the animation,"

which really suitable for our case here since the previous view's just hiding, thus the transition doesn't interrupt the animation of the gradients at all.

You can find HERO library through this link: https://github.com/HeroTransitions/Hero

Happy coding everyone : )