Latest 1.0.1
Homepage https://github.com/alexrvarela/CocoaTweener
License MIT
Platforms ios 8.0
Authors

Easy to use animation engine for iOs, make more powerfull and creative Apps.

Getting Started

Add interaction Animate backgroundsControl animation with UIScrollView

Prerequisites

  • Xcode with IOs 9.0+

Installing

Install manually

Download and copy the entire folder named "src" to your Xcode project.

Install using Cocoapods

In process...

Install using Carthage

In process...

Usage

Import CocoaTweener engine to your project:

#import "CocoaTweener.h"

Create and add simple Tween:

Tween* myTween = [[Tween alloc] init:view
    duration:1.0f
    ease:kEaseOutQuad
    keys:[NSDictionary dictionaryWithObjectsAndKeys:
    [NSValue valueWithCGPoint:p], @"center",
    nil]
    delay:0.f
];

[CocoaTweener addTween:myTween];

Interact with your code using handlers:

myTween.onStartHandler = ^{
    [self onStartExample];
};

myTween.onUpdateHandler = ^{
    [self onUpdateExample];
};

myTween.onCompleteHandler = ^{
    [self onCompleteExample];
};

Create TImeline:


Timeline* myTimeline = [[Timeline alloc] init];

[myTimeline addTween:myTween];
[myTimeline play];

Interact with Timeline play modes:

Loop

myTimeline.playMode = kTimelinePlayModeLoop;

Loop

Ping Pong

myTimeline.playMode = kTimelinePlayModePingPong;

Ping Pong

Use timeline inspector for debbug:

Visualize Tweens in real time!
Edit Tweens
Scale timeline editor

Create Timeline inspector:

TimelineInspector* myInspector = [[TimelineInspector alloc] init];
[self addSubview:myInspector];

myInspector.timeline = myTimeline;

Contributions

This project has being migrated to Swift for future contributions and will no longer be maintained.

Authors

  • Alejandro Ramírez VarelaInitial workalexrvarela

License

This project is licensed under the MIT License – see the LICENSE.md file for details

Acknowledgments

  • Based on Robert Penner Easing functions

  • Based on Tweener, AS3 Library by Zeh Fernando, Nate Chatellier, Arthur Debert and Francis Turmel
    Ported by Alejandro Ramirez Varela on 2012 and released as open source in 2018

Latest podspec

{
    "name": "CocoaTweener",
    "version": "1.0.1",
    "summary": "Animation engine for iOs, make more powerfull and creative Apps.",
    "homepage": "https://github.com/alexrvarela/CocoaTweener",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "alexrvarela": "https://github.com/alexrvarela"
    },
    "source": {
        "git": "https://github.com/alexrvarela/CocoaTweener.git",
        "tag": "1.0.1"
    },
    "social_media_url": "https://twitter.com/alexrvarela",
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "Source/*.{h,m}"
}

Pin It on Pinterest

Share This