Classes

The following classes are available globally.

  • 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
        .wait(100)
        // 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.

    See more

    Declaration

    Swift

    final public class anim: NSObject