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 columndensity
, number of characters by column for the animationminLength
, you can force the minimum count of columnsisAscending
, 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)