dri

DriftAnimationImageView

UIImageView subclass that performs slow translation and scale animations on its image

Showing:

Popularity

Downloads/wk

0

GitHub Stars

43

Maintenance

Last Commit

3yrs ago

Contributors

1

Package

Dependencies

0

License

MIT

Categories

Readme

DriftAnimationImageView

Version License Platform

Demo 0 Demo 1

Introduction

UIImageView subclass that performs slow translation and scale animations on its image.

You perform random translation and scale animations with beginDriftAnimations():

imageView.beginDriftAnimations()

You perform a custom animation by using the DriftAnimationTraits struct:

let traits = self.buildDriftAnimationTraits(imageView
    , repeats: true
    , zoomOut: false
    , minZoom: 1.0
    , maxZoom: 2.0
    , minPointsPerSec: 4
    , maxPointsPerSec: 5)
DriftAnimationImageView.addDriftAnimations(imageView, traits: traits, completion: nil)

You perform random translation and scale animations on a series of images with performDriftAnimations():

imageView.performDriftAnimations(["image0", "image1"])

You remove an ongoing animation with removeDriftAnimations():

imageView.removeDriftAnimations()

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

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

pod "DriftAnimationImageView"

License

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

Alternatives

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100