ReAnimation is a library which wraps the UIView.animate in a RxSwift context allowing to declaratively create new animations. For example, following code moves the view by 40 and simultaneously scales it up to 0.5 and back to 1 horizontally:
let duration = 2.0
view.rx.animate(
ReactiveAnimations.Move(offsetX: 40, duration: duration)
.simultaneously(
with: ReactiveAnimations.Scale(
factorX: 0.5,
duration: duration / 2
)
.followed(
by: ReactiveAnimations.Scale(
factorX: 1.0,
duration: duration
)
)
)
)
More examples are available in the example app.
ReAnimation is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'ReAnimation'
To install the library through Carthage add the following line to your Cartfile:
github "bartosy-ymija/ReAnimation"
ReAnimation is available under the MIT license. See the LICENSE file for more info.