anim alternatives and similar libraries
Based on the "Animation" category.
Alternatively, view anim alternatives based on common mentions on social networks and blogs.
-
Lottie
An iOS library for a real time rendering of native vector animations from Adobe After Effects. -
AnimatedCollectionViewLayout
A UICollectionViewLayout subclass that adds custom transitions/animations to the UICollectionView. -
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 -
Sica
Simple Interface Core Animation. Run type-safe animation sequencially or parallelly. -
Gagat
A delightful way to transition between visual styles in your iOS applications. -
TransitionableTab
TransitionableTab makes it easy to animate when switching between tab -
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". -
AKVideoImageView
UIImageView subclass which allows you to display a looped video as a background. -
TheAnimation
Type-safe CAAnimation wrapper. It makes preventing to set wrong type values. -
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. -
CircularRevealKit
UI framework that implements the material design's reveal effect. -
Kinieta
An Animation Engine with Custom Bezier Easing, an Intuitive API and perfect Color Intepolation. -
VariousViewsEffects
Animates views nicely with easy to use extensions.
Scout APM - Leading-edge performance monitoring starting at $39/month
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest. Visit our partner's website for more details.
Do you think we are missing an alternative of anim or a related project?
README
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(0.1)
// 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, and falls back to UIView.animate
on versions before iOS and tvOS 10.
It uses NSAnimationContext
on macOS.
Examples
Example projects are available at examples/
folder and as targets on XCode project.
Cocoapods
pod 'anim'
Carthage
github "onurersel/anim"
Manually
Or simply drag the swift files inside src/
folder into your project.
For complete documentation, visit http://onurersel.github.io/anim/.
Initialize animations with anim
constructor.
// Initialize with default settings
anim {
// animation block
}
// or initialize with it's own settings
anim { (settings) -> (animClosure) in
settings.delay = 1
settings.duration = 0.7
settings.ease = .easeInOutBack
return {
// animation block
}
}
// or initialize layout constraint animations just by passing the parent view
anim(constraintParent: self.view) {
// animation block
}
anim(constraintParent: self.view) { (settings) -> (animClosure) in
// settings...
return {
// animation block
}
}
// you don't need to call layoutIfNeeded() before or inside the
// animation blocks, it's handled by anim
//
// for example to update constant value of a constraint,
// you can just change it inside the animation block
let width: NSLayoutConstraint //...
anim(constraintParent: self.view) {
width.constant = 100 // new value
}
// that's it!
Chain animations with then
function.
anim {}
.then{
// next animation block
}
anim {}
.then { (settings) -> animClosure in
settings.duration = 1
return {
// next animation block
}
}
anim {}
.then(constraintParent: self.view) {
// chaining constraint animations
}
.then(constraintParent: self.view) { (settings) -> animClosure in
settings.duration = 1
return {
// next animation block for constraints
}
}
Wait between animation steps with wait
function.
anim{}.wait(0.25).then{} //...
Insert callbacks between animation steps with .callback
function.
anim{}
.callback {
// custom block
}
.then{} //...
Stop animations with stop
function.
let animation = anim{}.then{} // ...
animation.stop()
Default settings
You can change default animation settings through anim.defaultSettings
property.
anim.defaultSettings.ease = .easeInOutCubic
Easing
anim.Ease
exposes a bunch of easing options.
anim
is released under the MIT license. See LICENSE for details.
*Note that all licence references and agreements mentioned in the anim README section above
are relevant to that project's source code only.