Skip to content
Bring life to CALayers with SpriteKit-like animation builders
Swift Objective-C Ruby
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
Animo.xcodeproj swift 4.1 support Jun 10, 2018
Animo swift 4.1 support Jun 10, 2018
AnimoDemo Swift 3 project setting Sep 18, 2016
AnimoTests Swift 3 support Sep 18, 2016
Carthage WIP: group and sequence duration normalization Oct 1, 2015
.gitignore OSX support Feb 29, 2016
Animo.podspec swift 4.1 support Jun 10, 2018
LICENSE moved repo and ownership to eure, Inc. Feb 8, 2016 Merge branch 'master' into develop Feb 29, 2016


Version Platform License Carthage compatible

Bring life to CALayers with SpriteKit-like animation builders.


Why use Animo?

Because declaring CAAnimations (especially with CAAnimationGroups) is very verbose and tedious.

Animo turns this:

let positionAnimation = CABasicAnimation(keyPath: "position")
positionAnimation.fromValue = NSValue(CGPoint: fromPoint)
positionAnimation.toValue = NSValue(CGPoint: toPoint)

let colorAnimation = CABasicAnimation(keyPath: "backgroundColor")
colorAnimation.fromValue = fromColor.CGColor
colorAnimation.toValue = toColor.CGColor

let animationGroup = CAAnimationGroup()
animationGroup.animations = [positionAnimation, colorAnimation]
animationGroup.fillMode = kCAFillModeForwards
animationGroup.removedOnCompletion = false
animationGroup.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseInEaseOut)

someView.layer.addAnimation(animationGroup, forKey: "animationGroup")

to this:

        Animo.move(from: fromPoint, to: toPoint, duration: 1),
        Animo.keyPath("backgroundColor", from: fromColor, to: toColor, duration: 1),
        timingMode: .EaseInOut,
        options: Options(fillMode: .Forwards)

Feature List

  • All timing modes from are implemented.
  • Choose how to mix your animations with grouping utilities:
    • group(...)
    • sequence(...)
    • autoreverse(...)
    • wait(...)
    • replay(...) and replayForever(...)
  • No need to box native types and struct types in NSValues! Animo will do that for you for:
    • Int8
    • Int16
    • Int32
    • Int64
    • UInt8
    • UInt16
    • UInt32
    • UInt64
    • Int
    • UInt
    • CGFloat
    • Double
    • Float
    • CGPoint
    • CGSize
    • CGRect
    • CGAffineTransform
    • CGVector
    • CATransform3D
    • UIEdgeInsets
    • UIOffset
    • NSRange
  • No need to bother between CGColor and UIColor! Animo automatically converts the following types for you so you can just use UIKit objects all the time:
    • UIColorCGColor
    • UIImageUIImage
    • UIBezierPathCGPath
  • Don't bother type-casting M_PI anymore and just use Degrees-to-Radians (and vice-versa) extensions for CGFloat, Double, and Float!

Here's a slightly complex animation that showcases what else you can do with Animo:

    Animo.sequence( // Runs a list of animations in sequence
        Animo.wait(1), // Waits for a certain interval before running the next animation
        Animo.replayForever( // Replays the animation endlessly
                Animo.move( // Moves the layer's position
                    by: CGPoint(x: 100, y: 200), // "by", "from", and "to" arguments are supported
                    duration: 2,
                    timingMode: .Spring(damping: 1) // simplistic spring function that doesn't rely on physics
                Animo.rotateDegrees( // Rotates the layer (degrees and radians variants are supported)
                    by: -180,
                    duration: 1,
                    timingMode: .EaseInOutBack
                Animo.autoreverse( // Auto-reverses the animation
                        "cornerRadius", // Any custom KVC key is supported as well!
                        to: 10,
                        duration: 1,
                        timingMode: .EaseInOutBack
       // Runs multiple animations together
                        by: 2,
                        duration: 1,
                        timingMode: .EaseInOutBack
                        by: 0.5,
                        duration: 1,
                        timingMode: .EaseInOutBack
                    by: CGPoint(x: -100, y: -200),
                    duration: 2,
                    timingMode: .EaseInOutBack
                    by: 180,
                    duration: 1,
                    timingMode: .EaseInOutBack
                        to: 1,
                        duration: 1,
                        timingMode: .EaseInOutBack
                        to: 1,
                        duration: 1,
                        timingMode: .EaseInOutBack

Install with CocoaPods


pod 'Animo'

to your Podfile and run pod install

Install with Carthage


github "eure/Animo" >= 1.2.0

to your Cartfile and run carthage update

Install as Git Submodule


git submodule add <destination directory>

To install as a framework:

Drag and drop Animo.xcodeproj to your project.

To include directly in your app module:

Add all .swift files to your project.


Animo is released under an MIT license. See the LICENSE file for more information.

You can’t perform that action at this time.