Need help with JTNumberScrollAnimatedView?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

jonathantribouharet
204 Stars 40 Forks MIT License 7 Commits 3 Opened issues

Description

A scroll animation for display number for iOS

Services available

!
?

Need anything else?

Contributors list

# 24,266
Rails
Objecti...
iOS
Shell
5 commits
# 248,835
Kotlin
iOS
Shell
C
1 commit

JTNumberScrollAnimatedView

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 

#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
    , default to
    1.5
  • durationOffset
    , delay between the end of the animation of each column, default to
    0.2
  • density
    , number of characters added by column for the animation, default to
    5
  • minLength
    , you can force the minimum count of columns, default to
    0
  • isAscending
    , the direction of the scroll, default to
    NO

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.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.