TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Aug 2017 |
SwiftSwift Version | 3.0 |
SPMSupports SPM | ✗ |
Maintained by Luca Gobbo.
Simplfy animations with some sugar. This is a small library i personally use for my projets at my work.
inspired by this medium post
To run the example project, clone the repo, and run pod install
from the Example directory first.
constraint.constant = 100
UIView.Animator(duration: animation.duration)
.animations { self.view.layoutIfNeeded() }
.animate()
constraint.constant = 100
UIView.Animator(duration: animation.duration)
.animations { self.view.layoutIfNeeded() }
.completion { self.animationCompleted() }
.animate()
UIView.KeyFrameAnimator(duration: 0.6)
.addAnimation(relativeStartTime: 0, relativeDuration: 0.5) {
label.alpha = 0
button.transform = CGAffineTransform.identity.scaledBy(x: 0.1, y: 0.1)
}
.addAnimation(relativeStartTime: 0.5, relativeDuration: 0.3) {
imageView.transform = CGAffineTransform.identity.scaledBy(x: 1.2, y: 1.2)
imageView.alpha = 1
}
.addAnimation(relativeStartTime: 0.8, relativeDuration: 0.2) {
imageView.transform = CGAffineTransform.identity
}
.animate()
MinuteAnimations is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "MinuteAnimations"
Luca Gobbo, [email protected]
MinuteAnimations is available under the MIT license. See the LICENSE file for more info.