A demo showing you how to create interactive expand/collapse animation with UIViewPropertyAnimator
In this tutorial, I want to discuss with you another exciting way to animate your views - UIViewPropertyAnimator. This class gives you a lot more control than its predecessor UIView.animate. With it, you can build custom timing, interactive, and interruptible animations. Furthermore, you can change the animator on the fly.
For further reference, please refer to this tutorial: