Latest0.1.3
Homepagehttps://github.com/brownsoo/ValueAnimator
LicenseMIT
Platformsios 8.0, osx 10.10, tvos 9.0, watchos 2.0, requires ARC
Authors

Now in developing.. so methods or parameters are can be changed.

CI Status
Version
License
Platform

Demo

Demo for UIView animation

Usage

ValueAnimator makes the transition from initial value to target value using easing functions.

Simple animation

let animator = ValueAnimator.animate("some", from: 0, to: 360, duration: 1.0,
    onChanged: { p, v in 
        print("property (p): (v.value)")
    },
    easing: EaseCircular.easeIn())
animator.resume()

Thread

ValueAnimator uses its own work-thread. But the callback ‘ChangeFunction’, ‘EndFunction’ is called in main-thread. if you wanna it called in work-thread, you just set the ‘callbackOnMainThread’ property is false.

let someView: UIView!
let animator = ValueAnimator.animate("some", from: 0, to: 1, duration: 1.0,
    onChanged: { p, v in 
        // called in ValueAnimator's work-thread
    },
    easing: EaseCircular.easeIn())
animator.callbackOnMainThread = false
animator.resume()

Example

To run the example project, clone the repo, and run open ValueAnimator.xcworkspace.
You can see ValueAnimatorExample project.

Requirements

Installation

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

pod 'ValueAnimator'

Author

brownsoo, @hansoo.labs

License

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

Latest podspec

{
    "name": "ValueAnimator",
    "version": "0.1.3",
    "summary": "Value Animation in Swift",
    "description": "ValueAnimator makes value transition in specific duration with various easing utils.",
    "homepage": "https://github.com/brownsoo/ValueAnimator",
    "license": {
        "type": "MIT",
        "file": "LICENSE.md"
    },
    "authors": {
        "brownsoo": "[email protected]"
    },
    "social_media_url": "http://twitter.com/hansoolabs",
    "source": {
        "git": "https://github.com/brownsoo/ValueAnimator.git",
        "tag": "0.1.3"
    },
    "platforms": {
        "ios": "8.0",
        "osx": "10.10",
        "tvos": "9.0",
        "watchos": "2.0"
    },
    "requires_arc": true,
    "source_files": "ValueAnimator/**/*.swift"
}

Pin It on Pinterest

Share This