Skip to content

Latest commit

 

History

History
9 lines (5 loc) · 608 Bytes

File metadata and controls

9 lines (5 loc) · 608 Bytes

In this project, we demonstrate the formula of spring animation in iOS.

In the interface, there are two views below. The left one is animated by system API, the right one is animated by keyframe API where the positions are provided by a custom formula. You should see the two are very close in most cases.

The main formula of the spring is in SpringCurve.curveFunc of SpringCurve.swift.

Screen shot

Some calculation is inspired by Framer