Swiftpack.co - Package - bartosy-ymija/ReAnimation
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.

ReAnimation

CI Status Version License Platform codecov

Usage

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.

Installation

CocoaPods

ReAnimation is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'ReAnimation'

Carthage

To install the library through Carthage add the following line to your Cartfile:

github "bartosy-ymija/ReAnimation"

License

ReAnimation is available under the MIT license. See the LICENSE file for more info.