Latest 1.0.0
Homepage https://github.com/hectr/DriftAnimationImageView
License MIT
Platforms ios 8.0, tvos 9.0
Frameworks UIKit
Authors

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.

Latest podspec

{
    "name": "DriftAnimationImageView",
    "version": "1.0.0",
    "summary": "View that performs slow translation and scale animations on its image.",
    "description": "`UIImageView` subclass that performs random or custom slow translation and scale animations on its image.",
    "homepage": "https://github.com/hectr/DriftAnimationImageView",
    "screenshots": [
        "https://raw.githubusercontent.com/hectr/DriftAnimationImageView/master/demo0.gif",
        "https://raw.githubusercontent.com/hectr/DriftAnimationImageView/master/demo1.gif"
    ],
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Heu0300ctor Marqueu0300s": "[email protected]"
    },
    "social_media_url": "https://twitter.com/elnetus",
    "platforms": {
        "ios": "8.0",
        "tvos": "9.0"
    },
    "source": {
        "git": "https://github.com/hectr/DriftAnimationImageView.git",
        "tag": "1.0.0"
    },
    "source_files": "Sources/*",
    "xcconfig": {
        "ENABLE_TESTABILITY[config=Debug]": "YES"
    },
    "frameworks": "UIKit",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This