iOS 显示数字的滚动动画:JTNumberScrollAnimatedView

jopen 10年前

JTNumberScrollAnimatedView 是 iOS 显示数字的滚动动画。 

#import <UIKit/UIKit.h>    #import "JTNumberScrollAnimatedView.h"    @interface ViewController : UIViewController    @property (weak, nonatomic) IBOutlet JTNumberScrollAnimatedView *animatedView;    @end

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)

iOS 显示数字的滚动动画:JTNumberScrollAnimatedView

项目主页:http://www.open-open.com/lib/view/home/1419163667823