cruisediary / Pastel

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

Is there a way to continue the gradient animation on a different ViewController? #29

Open parthsaxena opened 6 years ago

parthsaxena commented 6 years ago

When running a gradient animation on one ViewController, is it possible to continue the same animation from its current state on a different ViewController upon transitioning?

av0c0der commented 6 years ago

@parthsaxena you can add the PastelView directly to the key window and make your container views transparent.

parthsaxena commented 6 years ago

How could I go about this? I attempted to do so, and it kind of works. However, when transitioning to/from viewcontrollers, the screen goes black for a brief second before continuing the animation.

av0c0der commented 5 years ago

Sorry, missed this one. You have to deal somehow with these transition glitches, because UINavigationController push transition expect views with non alpha background colors. I handled this by providing my own push transition animation with Hero.