Inspired again by a wonderful article by Kitten, I wanted to do the same animations that Kitten had done in the original article.

The final result is as follows:

There are some basic things to know in advance:

CADisplayLink, understood as a timer that synchronizes with the screen refresh rate. Visible Kitten’s blog: www.kittenyang.com/cadisplayli…

UIKit Dynamics, the “physics engine” included in UIKit after iOS7 that can be applied to View objects. See this post by Pandara: pandara.xyz/2015/10/28/…

The original address —— because this article does not have a complete Demo, the code introduction is relatively simple without details to write, I look after the itch to do a Demo for reference: github.com/dengzemiao/…