val

ValueTween

Simple Tween and Easing Library for Objective-C.

Showing:

Popularity

Downloads/wk

0

GitHub Stars

42

Maintenance

Last Commit

8yrs ago

Contributors

2

Package

Dependencies

0

License

MIT

Categories

Readme

Value Tween Library for Objective-C

  1. link "QuartzCore.framework".
  2. copy "Tween.h" "Tween.m" "TweenObject.h" "TweenObject.m" to your project.
  3. import "Tween.h" and import "TweenObject.h".
  4. call and implement a callback.
  5. enjoy!!

Example Usage

#import "Tween.h"
#import "TweenObject.h"

- (IBAction)buttonWasTapped:(id)sender
{
    [Tween addTween:self
            tweenId:0
         startValue:10
           endValue:290
               time:2
              delay:0
             easing:@"easeNone"
           startSEL:nil
          updateSEL:@selector(update:)
             endSEL:@selector(end:)];
}

- (void)update:(TweenObject *)tween
{
    self.view.frame  = CGRectMake(tween.currentValue,  5,20,20);
}
- (void)end:(TweenObject *)tween
{
    self.view.frame  = CGRectMake(tween.currentValue,  5,20,20);
}

remove Tween

[Tween addTween:self tweenId:0 ...
// Remove Tween By tweenId
[Tween removeTweenForId:0];

TweenObject *tweenObject = [Tween addTween:self tweenId:1 ...
// Remove Tween by TweenObject
[Tween removeTweenForObject:tweenObject];

Licensed

Licensed under the MIT License

Copyright (c) 2012 Nobuhiro Takahashi

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Thanks

Thanks mokagio for solve some problems of llvm5 warning. https://github.com/mokagio

Thanks heart for add methods useful. https://github.com/heart

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