CocoaPods trunk is moving to be read-only. Read more on the blog, there are 14 months to go.
| TestsTested | ✗ |
| LangLanguage | Obj-CObjective C |
| License | MIT |
| ReleasedLast Release | Dec 2014 |
Maintained by Jonathan Vukovich Tribouharet.
Use JTNumberScrollAnimatedView for have a nice animation for display number. It's easy to use, easy to customize.
With CocoaPods, add this line to your Podfile.
pod 'JTNumberScrollAnimatedView', '~> 1.0'
You can use JTNumberScrollAnimatedView lile normal view.
#import <UIKit/UIKit.h>
#import "JTNumberScrollAnimatedView.h"
@interface ViewController : UIViewController
@property (weak, nonatomic) IBOutlet JTNumberScrollAnimatedView *animatedView;
@endYou just have to call setValue with a NSNumber and use startAnimation for launch the animation.
- (void)viewDidLoad
{
[super viewDidLoad];
[self.animatedView setValue:@249];
}
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
[self.animatedView startAnimation];
}For now the value must be a positive integer.
You can easily change some properties of the animation.
Each caracter have its own column.
textColorfontdurationdurationOffset, delay between the end of the animation of each columndensity, number of characters by column for the animationminLength, you can force the minimum count of columnsisAscending, the direction of the scrollIf you change one of this properties, you have to call setValue for update the view.
JTNumberScrollAnimatedView is released under the MIT license. See the LICENSE file for more info.