JHChainableAnimations: Chainable UIKit Animations for Objective-C and Swift
GitHub describes it as Easy to read and write chainable animations in Objective-C and Swift. The repository metadata lists Objective-C as its primary language. The metadata lists the MIT license. This article stays within the project description and details documented in the GitHub repository README.
At a glance
- What is it?
- JHChainableAnimations wraps UIView and Core Animation into a fluent Objective-C and Swift API that turns multi-step animation sequences into single readable chains. The library is MIT-licensed, supports CocoaPods and Carthage, and is worth a look if you are tired of nested completion blocks.
- Who is it for?
- Adopt JHChainableAnimations if you write many sequential or combined UIView animations in Objective-C or Swift and want a syntax that reads like a sentence rather than a pyramid of completion blocks. Avoid it if you need macOS support, if you are on a strict dependency budget and can afford to write your own helper, or if you prefer the explicit control of raw Core Animation.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Probably not. The repository last received commits 106 months ago, on January 4, 2018.
- What is it written in?
- Mainly Objective-C, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 7, 2026, and from our analysis. They are not legal advice.
Editorial analysis
The problem: nested completion blocks and unreadable animation code
UIKit's UIView animation API is powerful but awkward when you need to sequence several animations. The README shows the old way: a UIView animation with a completion block that starts another UIView animation, and the code is already cut off because it gets long. JHChainableAnimations addresses that by providing a chainable interface where each animation step is a method call that returns the animator, so you can write the whole sequence in one line. The library is aimed at iOS developers who want to express animation intent directly in code, without losing readability. It is not a general animation engine; it is a wrapper that makes the existing UIKit and Core Animation APIs more ergonomic.
How the chain works: animator, chainable properties, and the animate() terminal
The core object is JHChainableAnimator, created with initWithView:. You then call chainable properties like moveX(x), makeScale(2.0), or moveXY(100, 50) to describe what to animate. These properties must come before the animate(t) function, which is the terminal call that actually starts the animation. The README gives an example: animator.moveX(50).spring.thenAfter(1.0).makeBackground([UIColor purpleColor]).easeIn.animate(0.5);. This one line moves the view 50 points to the right with a spring, waits 1 second, then changes the background color with ease-in. The chainable properties are combined, not sequential, unless you insert thenAfter(t). The order of combined properties does not matter: makeScale(2.0).moveXY(100, 50).animate(1.0) is the same as moveXY(100, 50).makeScale(2.0).animate(1.0). This design means the library builds a list of animation steps internally, each with its own properties, effects, and anchor, and then plays them in sequence.
Getting it running: CocoaPods, Carthage, and manual integration
Installation is standard for an iOS framework. With CocoaPods, add pod 'JHChainableAnimations', '~> 3.0.1' for Objective-C, or pod 'ChainableAnimations', '~> 3.0.1' for Swift. Then import the appropriate module: #import <JHChainableAnimations/JHChainableAnimations.h> or import ChainableAnimations. With Carthage, add github "jhurray/JHChainableAnimations" ~> 3.0.1 to your Cartfile and link the corresponding framework. Manual integration is possible by cloning the repo and adding the files in the JHChainableAnimations directory. The README notes that the Swift framework is called ChainableAnimations, which is a separate framework from the Objective-C one, so you pick based on your language.
Effects, anchors, delays, and completion: the API surface
The library provides a set of modifier properties that change how an animation behaves. Effects like spring, bounce, and easeIn are applied after a chainable property, and they affect that specific step. If you add two effects to the same step, the second cancels the first: animator.makeScale(2.0).bounce.spring.animate(1.0) is the same as animator.makeScale(2.0).spring.animate(1.0). Anchor methods like anchorTopLeft and anchorCenter change the view's anchor point for rotation and scale. They also cancel each other if called in the same chain. Delays are handled with wait(t) or delay(t), which are synonyms. For completion, you can set the completionBlock property or call animateWithCompletion(t, completion). The README shows both are equivalent. This is a clean API, but note that the list of chainable properties, effects, and anchors is only referenced by links in the README, not fully enumerated in the provided material.
Repeating, pausing, and cancelling: the less obvious parts
Repeating animations is done with repeat(time, count) or animateWithRepeat(time, count). The README gives two examples. First, animator.makeScale(2.0).repeat(0.5, 3).moveXY(100, 50).animate(1.0) doubles the scale three times, each for 0.5 seconds, then moves and finishes. Second, animator.makeScale(2.0).thenAfter(0.5).rotate(90).animateWithRepeat(1.0, 3) repeats the last part (rotate 90 degrees) three times for 1 second each. Pausing is supported via the pause method, but the README is truncated right after mentioning that when you call pause, the current animation in the chain will complete but nothing else. This is a critical detail: pause does not stop the current animation immediately, it lets it finish. That might be surprising if you expect a hard stop. Cancelling is mentioned in the section title but the details are cut off, so you must look at the actual source or the full README to know how cancel behaves.
A real limitation: it is a wrapper, not a new animation engine
JHChainableAnimations does not replace Core Animation or UIView animations; it wraps them. That means you are limited by the underlying capabilities. For example, the README mentions that version 2.x re-architected to stop hacking UIView, but it still relies on UIView and CAAnimation under the hood. If you need custom timing curves beyond the provided effects, or complex keyframe animations, you will likely have to drop down to raw Core Animation. Also, the library is iOS-only, as it depends on UIKit. There is no macOS or tvOS support mentioned. Another limitation is that the API is Objective-C first. The Swift interface is a separate framework, but the README's examples are mostly Objective-C, and Swift users may find the syntax less natural than a native Swift library.
Alternatives: RBBAnimation, DCAnimationKit, and PMTween
The README itself names three alternatives: RBBAnimation, DCAnimationKit, and PMTween. It says these libraries are good but fall short of having powerful chainable animations AND easy to read/write syntax. RBBAnimation is a block-based animation library that provides custom easing and spring animations, but it does not focus on chaining. DCAnimationKit is a library that provides a set of pre-built animations like slide, bounce, and fade, but it is not chainable in the same way. PMTween is a tweening engine that gives you precise control over animation values, but it requires more manual setup. The key difference is that JHChainableAnimations puts the chainable syntax front and center, while the alternatives either focus on individual animation types or require more boilerplate. If you need fine-grained control over interpolation, PMTween might be better. If you only need a few canned effects, DCAnimationKit could be simpler.
Maintenance and upgrade cost
The repository is not archived and has a master branch, but the last push and recent releases are unknown from the provided material. The README mentions version 3.x adds Swiftier syntax, Swift 4 support, and bug fixes. Version 2.x re-architected to remove UIView hacking, added pre and post animation hooks, pause/resume, repeat, and a friendly Swift interface. This suggests the API has changed between major versions. If you upgrade from 1.x to 2.x, you may need to update your code significantly. The license is MIT, which means you can use it freely in commercial projects, but you must include the copyright notice. There are no legal implications beyond that, but you should verify the license text in the repository. For maintenance, the library is small and self-contained, so the upgrade cost is low if you stay within the same major version. However, the lack of recent release information means you should check the repository for activity before depending on it heavily.
Editorial conclusion
Adopt JHChainableAnimations if you write many sequential or combined UIView animations in Objective-C or Swift and want a syntax that reads like a sentence rather than a pyramid of completion blocks. Avoid it if you need macOS support, if you are on a strict dependency budget and can afford to write your own helper, or if you prefer the explicit control of raw Core Animation. Before adopting, verify that the version you pull via CocoaPods or Carthage matches the 3.x API shown in the README, and test that pause and cancel behave as you expect on your deployment targets, because the documentation is thin on edge cases.
Frequently asked questions
What is JHChainableAnimations?
An MIT licensed framework, written in both Objective-C and Swift, for expressing a sequence of view animations as one chain rather than as nested animation blocks. It supports combining properties, sequencing with a delay, per-step effects, anchoring, delays, completion handlers, repeating, and pausing. It is published as two frameworks from one repository, with different module names depending on the language, and offers three installation routes.
Why do JHChainableAnimations effects overwrite each other?
By design, according to its own documentation: if you add two effects to the same chainable property, the second cancels the first, so a scale with a bounce and a spring behaves exactly as the scale with only the spring. The same last-one-wins rule is documented for anchor calls. Ordering the properties themselves does not matter; only duplicate effects and duplicate anchors overwrite.
How do I install JHChainableAnimations?
Three routes, and all three pinned ones specify the same minor version line. A package manager route with one pod line for the Objective-C framework name and one for the Swift name, each followed by the matching import. A source dependency route with an entry in your dependency manifest file. Or a manual route, which is cloning the repository and adding the source directory to the project yourself.
Is JHChainableAnimations still maintained?
The repository's branch was last pushed on 2018-01-04, and there are no tagged releases in it. The newest notes in the readme are for version 3.x and list Swift 4 support, and a file at the root pins the Swift toolchain version. So the code and the documentation describe a state that has not changed in more than eight years, which makes the readme a reliable description of that state rather than of the library as it stands today.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/jhurray-jhchainableanimations)