---
title: "#222: Beautiful Predefined Animations Using Spring 🏃🏼🚶🏼"
url: https://littlebitesofcocoa.com/222-beautiful-predefined-animations-using-spring
author: Jake Marsh
published: 2016-03-29
topics: ["Libraries","Animation"]
description: "Creating good-looking animations can be a lot of work. We could spend our whole day learning about curves and scaling, and transforms, and oh boy..."
---

# #222: Beautiful Predefined Animations Using Spring 🏃🏼🚶🏼

By Jake Marsh, March 29, 2016. HTML: https://littlebitesofcocoa.com/222-beautiful-predefined-animations-using-spring

Creating good-looking animations can be a lot of work. We could spend our whole day learning about curves and scaling, and transforms, and oh boy...

Instead, what if we could simply apply some popular animations to our UI elements with almost no effort at all? Today we'll check out a library called [Spring](https://github.com/MengTo/Spring) that allows us to do just that.

[Spring](https://github.com/MengTo/Spring) supplies a ton of common animations like shake, pop, squeeze, wobble, etc.

If we're using **Interface Builder**, we actually don't even need any code at all. We just use one of [Spring's](https://github.com/MengTo/Spring) **UIView**-subclasses, then we supply our animation by name.

<img src="https://camo.githubusercontent.com/96d7892bf2ea4da272e8ae6b45842f60ebb70933/687474703a2f2f636c2e6c792f696d6167652f3234316f30473147335333362f646f776e6c6f61642f737072696e6773657475702e6a7067" style="max-width: 500px;" />

In code, it's equally simple:

``` swift
layer.animation = "shake"
layer.animate()
```

These all work great out of the box, but we can still customize the curve or individual properties if needed. Neat!

More info about _Spring_ can be found at [git.io/spring](http://git.io/spring)
