Github url


by MengTo

MengTo /Spring

A library to simplify iOS animations in Swift.

13.7K Stars 1.7K Forks Last release: Not found MIT License 254 Commits 7 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

Updated for Swift 4.2

Requires Xcode 10 and Swift 4.2.


Drop in the Spring folder to your Xcode project (make sure to enable "Copy items if needed" and "Create groups").

Or via CocoaPods:

use\_frameworks! pod 'Spring', :git =\> ''

Usage with Storyboard

In Identity Inspector, connect the UIView to SpringView Class and set the animation properties in Attribute Inspector.

Usage with Code

layer.animation = "squeezeDown" layer.animate()

Demo The Animations

Chaining Animations

layer.y = -50 animateToNext { layer.animation = "fall" layer.animateTo() }


animate() animateNext { ... } animateTo() animateToNext { ... }


shake pop morph squeeze wobble swing flipX flipY fall squeezeLeft squeezeRight squeezeDown squeezeUp slideLeft slideRight slideDown slideUp fadeIn fadeOut fadeInLeft fadeInRight fadeInDown fadeInUp zoomIn zoomOut flash


spring linear easeIn easeOut easeInOut


force duration delay damping velocity repeatCount scale x y rotate

* Not all properties work together. Play with the demo app.


Allows you to animate without code. Don't need to use this if you plan to start the animation in code.


Saves you the hassle of adding a line "layer.alpha = 0" in viewDidLoad().

Known issue

Animations won't autostart when view is reached via performSegueWithIdentifier.




Spring is released under the MIT license. See LICENSE for details.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.