Latest 1.0.0
Homepage https://github.com/jonathantribouharet/JTNumberScrollAnimatedView
License MIT
Platforms ios 7.0, requires ARC
Authors

CI Status
Version
License
Platform

Use JTNumberScrollAnimatedView for have a nice animation for display number.
It’s easy to use, easy to customize.

Installation

With CocoaPods, add this line to your Podfile.

pod 'JTNumberScrollAnimatedView', '~> 1.0'

Screenshots

Example

Usage

Basic usage

You can use JTNumberScrollAnimatedView like a normal view.

#import <UIKit/UIKit.h>

#import "JTNumberScrollAnimatedView.h"

@interface ViewController : UIViewController

@property (weak, nonatomic) IBOutlet JTNumberScrollAnimatedView *animatedView;

@end

You 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];
}

WARNING

For now the value must be a positive integer.

Customization

You can easily change some properties of the animation.
Each caracter have its own column.

  • textColor
  • font
  • duration
  • durationOffset, delay between the end of the animation of each column
  • density, number of characters by column for the animation
  • minLength, you can force the minimum count of columns
  • isAscending, the direction of the scroll

If you change one of this properties, you have to call setValue for update the view.

Requirements

  • iOS 7 or higher
  • Automatic Reference Counting (ARC)

Author

License

JTNumberScrollAnimatedView is released under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "JTNumberScrollAnimatedView",
    "version": "1.0.0",
    "summary": "A scroll animation for display number for iOS",
    "homepage": "https://github.com/jonathantribouharet/JTNumberScrollAnimatedView",
    "license": {
        "type": "MIT"
    },
    "authors": {
        "Jonathan Tribouharet": "[email protected]"
    },
    "platforms": {
        "ios": "7.0"
    },
    "source": {
        "git": "https://github.com/jonathantribouharet/JTNumberScrollAnimatedView.git",
        "tag": "1.0.0"
    },
    "source_files": "JTNumberScrollAnimatedView/*",
    "requires_arc": true,
    "screenshots": [
        "https://raw.githubusercontent.com/jonathantribouharet/JTNumberScrollAnimatedView/master/Screens/example.gif"
    ]
}

Pin It on Pinterest

Share This