Replace view or view2 with the name of your uiview and the color of your choice.
47+ Background Color Animation Swift
Pictures. I'd like to animate background of uiview with random colours. Because you want to use elasticshape as the primary background of your view, you have to override backgroundcolor inside elasticview.
Transparent Table View With A Background Image Grok Swift from grokswift.com
Change background color, font and text color of uialertcontroller swift. This is what i have so far (it does exactly what i want when i specify just 2 colors). Tweenkit is a powerful animation library that allows you to animate (or 'tween') anything.
It looks much better when its not a gif btw.
Next few lines to ensure that our gradient here are the 2 files if anyone is lost. Adding background colors to specific views or to an entire app is a common thing you'll need to do as an ios developer. If you ever tried to animate a gradient, you probably found out that there are limitations. Use uiappearance, or subclass uiviewcontroller.