
Spring
A Swift library that adds ready-made animation effects to iOS views with little code.
- Stars
- 14.1k
- Forks
- 1.8k
- Licence
- MIT
- Language
- Swift
- Last update
- 3.3 years ago
- Type
- Library
No commits in over a year — check for forks or alternatives before adopting.
What it is
Spring is a Swift library for iOS that provides a set of prebuilt animations, such as shake, pop, fade, slide and zoom, that can be applied to user interface views. It can be used by setting properties in Xcode's Storyboard editor or by writing a few lines of code. It is mainly used to make app interfaces move in a polished way without writing animation math by hand.
- Animate a button with a squeeze or bounce effect when the screen appears
- Fade or slide views in and out during navigation
- Chain several animations one after another using animateToNext
- Add a shake effect to a form field to signal an error
Great for
- iOS developers who want common UI animations without building them from scratch
- Developers prototyping app screens and transitions quickly
- Developers who prefer setting animations in Storyboard without much code
- Teams maintaining Swift 4.2-era iOS projects
Not ideal for
- Projects on current Swift or Xcode versions, since the README states it was updated for Swift 4.2 and Xcode 10 and the last push was in 2023 with no release listed
- Developers who need Android or web animations, since this is iOS-only
- Anyone needing a documented, versioned API, since the README is short and no release is published
How to get it
- 1
Clone and build from source
You'll need: Xcode 10 · Swift 4.2 · CocoaPods (optional, if using the pod install route)
Clone the repository
git clone https://github.com/MengTo/SpringCocoaPods entry (add to Podfile)
pod 'Spring', :git => 'https://github.com/MengTo/Spring.git' - 2
Run it
- Add the Spring folder to your Xcode project, enabling "Copy items if needed" and "Create groups".
- In Storyboard, connect a UIView to the SpringView class in the Identity Inspector.
- Set an animation name and call layer.animate() from code, or use the Attribute Inspector.
- Try the presets in the demo app to see which combinations work.
- 3
Get the most out of it
- Use animateNext or animateTo to run animations at specific points in your flow
- Chain animations with animateToNext to sequence multiple effects
- Use Autostart to animate views without writing code
- Use Autohide to hide a view's alpha without manually setting it in viewDidLoad
- Follow the Design+Code tutorials linked in the README for deeper examples
Downloads
Strengths
- Provides a large set of built-in animation presets and curve options listed in the README
- Can be used from Storyboard without writing code
- Widely starred and well known in the iOS community, with a demo app and tutorials referenced
Trade-offs
- The README targets Swift 4.2 and Xcode 10, which are old, so compatibility with current tools is unclear
- The README notes that not all properties work together and that a known issue affects segue-based views
- No published release or topics listed, and the README is brief about maintenance status
How it compares
| Project | Stars | Type | Level | Updated | Best for |
|---|---|---|---|---|---|
| Spring (this) | 14.1k | Library | beginner | 3.3 years ago | iOS developers who want common UI animations without building them from scratch |
| Hero | 22.5k | Library | intermediate | 1.8 years ago | iOS developers who want custom screen transitions without writing UIKit animation code by hand |
Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.