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 that allows us to do just that.

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 UIView-subclasses, then we supply our animation by name.

- 687474703a2f2f636c2e6c792f696d6167652f3234316f30473147335333362f646f776e6c6f61642f737072696e6773657475702e6a7067 - #222: Beautiful Predefined Animations Using Spring πŸƒπŸΌπŸšΆπŸΌ – Little Bites of Cocoa

In code, it’s equally simple:

layer.animation = "shake"

These all work great out of the , but we can still customize the curve or individual properties if needed. Neat!

More info about can be found at

Source link


Please enter your comment!
Please enter your name here