/ Animations

Swift animation library for iOS, tvOS and macOS

Swift animation library for iOS, tvOS and macOS


An animation library for iOS with custom easings and easy to follow API.

anim is an animation library written in Swift with a simple, declarative API in mind.

// moves box to 100,100 with default settings
anim {
    self.box.frame.origin = CGPoint(x:100, y:100)
// after that, waits 100 ms
// moves box to 0,0 after waiting
.then {
    self.box.frame.origin = CGPoint(x:0, y:0)
// displays message after all animations are done
.callback {
    print("Just finished moving 📦 around.")

It supports a bunch of easing functions and chaining multiple animations. It's a wrapper on Apple's UIViewPropertyAnimator on its core, and falls back to UIView.animate on versions before iOS and tvOS 10. It uses NSAnimationContext on macOS.



pod 'anim'


github "onurersel/anim"


Or simply drag the swift files inside src/ folder into your project.