Member-only story
SwiftUI Advanced Animation: Morphing Shapes
I’m going to show how complex SwiftUI views can be animated efficiently using VectorArithmetic protocol with Accelerate library

The regular .animate()
function already provides a powerful way of animating views. Yet, its usage is limited to simple transformations.
In this guide, I'm going to show how complex SwiftUI views can be animated efficiently using VectorArithmetic
protocol with Accelerate
library for fast computations.
Inspiration
In the course of this guide, we will make a morphing sphere animation inspired by lava lamp bubbles. Some kind of wobbling lava bubbles.
💡 The proposed technique can be used in other even more complex animations

Creating custom animations
You may think about animation as a transition between two states. And this transition must be smooth! To display this smooth transition, SwiftUI needs to know how to draw in-between stages.