TheAnimation alternatives and similar libraries
Based on the "Animation" category.
Alternatively, view TheAnimation alternatives based on common mentions on social networks and blogs.
-
Lottie
An iOS library to natively render After Effects vector animations -
ViewAnimator
ViewAnimator brings your UI to life with just one line -
AnimatedCollectionViewLayout
A UICollectionViewLayout subclass that adds custom transitions/animations to the UICollectionView without effecting your existing code. -
Spruce iOS Animation Library
Swift library for choreographing animations on the screen. -
Gemini
Gemini is rich scroll based animation framework for iOS, written in Swift. -
Transition
Easy interactive interruptible custom ViewController transitions -
DeckTransition
A library to recreate the iOS Apple Music now playing transition -
YapAnimator
Your fast and friendly physics-based animation system. -
Motion
A library used to create beautiful animations and transitions for iOS. -
Sica
:deer: Simple Interface Core Animation. Run type-safe animation sequencially or parallelly -
TransitionableTab
TransitionableTab makes it easy to animate when switching between tab. -
Gagat
A delightful way to transition between visual styles in your iOS applications. -
AlertTransition
AlertTransition is a extensible library for making view controller transitions, especially for alert transitions. -
YetAnotherAnimationLibrary
Designed for gesture-driven animations. Fast, simple, & extensible! -
SwipeTransition
Allows trendy transitions using swipe gesture such as "swipe back anywhere". -
SPPerspective
Widgets iOS 14 animation with 3D and dynamic shadow. Customisable transform and duration. -
AKVideoImageView
UIImageView subclass that allows you to display a looped video and dynamically switch it. -
Wobbly
(Animate CSS) animations for iOS. An easy to use library of iOS animations. As easy to use as an easy thing. -
AGInterfaceInteraction
library performs interaction with UI interface -
Poi
Poi makes you use card UI like tinder UI .You can use it like tableview method. -
Disintegrate
Disintegration animation inspired by THAT thing Thanos did at the end of Avengers: Infinity War. -
VariousViewsEffects
Various view's effects for iOS, written in Swift. Allows you to animate views nicely with easy to use extensions. Currently supported animations: Glass Break, Explode, Snowflakes. Every animation is randomized. -
MagicKit
An Advanced and Flexible Framework for Building Engaging Transitions.
Appwrite - The open-source backend cloud platform
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of TheAnimation or a related project?
README
TheAnimation
TheAnimation is Type-safe CAAnimation wrapper.
[](./Images/basic_animation.png)
Introduction
For example, if you want to animate backgroundColor
with CABasicAnimation
, you need to consider type because fromValue property and so on are Any?
.
[](./Images/background_raw.png)
If you use BasicAnimation of TheAnimation
, you can animate backgroundColor
without considering type! (AnimationKeyPaths.backgroundColor
is AnimationKeyPath<CGColor>
type.)
[](./Images/background.png)
Usage
The way of making an animation is almost similar CAAnimation
.
But you need to use animation.animate(in:)
method instead of using layer.add(_:forKey:)
.
let view = UIView()
let animation = BasicAnimation(keyPath: .opacity)
animation.fromValue = 0
animation.toValue = 1
animation.duration = 1
animation.animate(in: view)
animation.animate(in:)
returns AnimaitonCanceller
. You can cancel an animation with it.
let canceller = animation.animate(in: view)
canceller.cancelAnimation()
Example
To run the example project, clone the repo, and open Example directory.
Correspondence Table
CAAnimation | TheAnimation |
---|---|
CAPropertyAnimation | PropertyAnimation |
CABasicAnimation | BasicAnimation |
CAKeyframeAnimation | KeyframeAnimation |
CASpringAnimation | SpringAnimation |
CATransition | TransitionAnimation |
CAAnimationGroup | AnimationGroup |
Add new AnimationKeyPath
You can add AnimationKeyPath
like this.
extension AnimationKeyPaths {
static let newKeyPath = AnimationKeyPath<CGFloat>(keyPath: "abcd")
}
Handle animation did Start
/ Stop
You can handle animation did Start with func setAnimationDidStart(handler:)
.
In addition, you can handle animation did Stop with func setAnimationDidStop(handler:)
.
let view = UIView()
let animation = BasicAnimation(keyPath: .opacity)
animation.fromValue = 0
animation.toValue = 1
animation.duration = 1
animation.setAnimationDidStart {
// do something
}
animation.setAnimationDidStop { finished in
// do something
}
animation.animate(in: view)
Requirements
- Xcode 9.3
- iOS 9 or greater
- tvOS 9 or greater
- macOS 10.11 or greater
- Swift 4.2 (since 0.3.0)
Installation
Carthage
If you’re using Carthage, simply add
TheAnimation to your Cartfile
:
github "marty-suzuki/TheAnimation"
CocoaPods
TheAnimation is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'TheAnimation'
Author
marty-suzuki, [email protected]
License
TheAnimation is available under the MIT license. See the LICENSE file for more info.
*Note that all licence references and agreements mentioned in the TheAnimation README section above
are relevant to that project's source code only.