你的位置:首页 > 软件开发 > 操作系统 > iOS 数字滚动 类似于老

iOS 数字滚动 类似于老

发布时间:2016-06-18 18:00:08
效果图 具体实现代码如下 ZCWScrollNumView.h文件#import <UIKit/UIKit.h>typedef enum { ZCWScrollNumAnimationTypeNone, ZCWScrollNumAnimationTypeN ...

iOS  数字滚动 类似于老

效果图

iOS  数字滚动 类似于老iOS  数字滚动 类似于老

 

具体实现代码如下 

ZCWScrollNumView.h文件

#import <UIKit/UIKit.h>typedef enum {  ZCWScrollNumAnimationTypeNone,  ZCWScrollNumAnimationTypeNormal,  ZCWScrollNumAnimationTypeFromLast,  ZCWScrollNumAnimationTypeRand,  ZCWScrollNumAnimationTypeFast} ZCWScrollNumAnimationType;@interface ZCWScrollDigitView : UIView {  CGFloat _oneDigitHeight;}@property (retain, nonatomic) UIView *backgroundView;@property (retain, nonatomic) UILabel *label;@property (readonly, nonatomic) NSUInteger digit;@property (retain, nonatomic) UIFont *digitFont;- (void)setDigitAndCommit:(NSUInteger)aDigit;- (void)setDigitFromLast:(NSUInteger)aDigit;- (void)setDigit:(NSUInteger)aDigit from:(NSUInteger)last;- (void)setDigitFast:(NSUInteger)aDigit;- (void)setRandomScrollDigit:(NSUInteger)aDigit length:(NSUInteger)length;- (void)commitChange;- (void)didConfigFinish;@end@interface ZCWScrollNumView : UIView {  NSMutableArray *_numberViews;}@property (nonatomic) NSUInteger numberSize;@property (nonatomic) CGFloat splitSpaceWidth;@property (nonatomic) CGFloat topAndBottomPadding;@property (readonly, nonatomic) NSUInteger numberValue;@property (retain, nonatomic) UIView *backgroundView;@property (retain, nonatomic) UIView *digitBackgroundView;@property (retain, nonatomic) UIFont *digitFont;@property (readonly, nonatomic) NSArray *numberViews;@property (retain, nonatomic) UIColor *digitColor;@property (nonatomic) NSUInteger randomLength;- (void)setNumber:(NSUInteger)number withAnimationType:(ZCWScrollNumAnimationType)type animationTime:(NSTimeInterval)timeSpan;- (void)didConfigFinish;@end

原标题:iOS 数字滚动 类似于老

关键词:IOS

IOS
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。