Latest 1.0.4
Homepage https://github.com/yulingtianxia/YXYNumberAnimationLabel
License MIT
Platforms ios 6.0, requires ARC
Frameworks Foundation, UIKit
Authors

YXYNumberAnimationLabel Build Status

一个数字动画Label

使用方法

设置AnimationSpeed属性的值可以调节动画变化速度,getter/setter方法如下:

-(double)AnimationSpeed;
-(void)setAnimationSpeed:(double)speed;

字体会根据数字位数来自动调节字体大小,你也可以通过实现numberSizeBlock来自定义字体大小,例如:

[self.numberLabel setNumberSizeBlock:^(double number) {
        self.numberLabel.font = [UIFont fontWithName:self.numberLabel.font.fontName size:30.0];
}];

最后调用changeFromNumber: toNumber: withAnimationTime:方法来让数字动起来:

[self.numberLabel changeFromNumber:1 toNumber:999999999 withAnimationTime:0.001];

安装

CocoaPods Installation

在Podfile中加入:

pod 'YXYNumberAnimationLabel'

Manual Installation

将YXYNumberAnimationLabel文件夹拖拽到你的工程

Latest podspec

{
    "name": "YXYNumberAnimationLabel",
    "version": "1.0.4",
    "summary": "u4e00u4e2au53efu4ee5u52a8u8d77u6765u7684u6570u5b57Label",
    "description": "                    u901au8fc7u8bbeu7f6eu6570u5b57u53d8u5316u7684u63d2u503cu6765u5c55u73b0u52a8u753bu6548u679cn",
    "homepage": "https://github.com/yulingtianxia/YXYNumberAnimationLabel",
    "license": "MIT",
    "authors": {
        "YangXiaoyu": "[email protected]"
    },
    "social_media_url": "http://twitter.com/yulingtianxia",
    "source": {
        "git": "https://github.com/yulingtianxia/YXYNumberAnimationLabel.git",
        "tag": "1.0.4"
    },
    "platforms": {
        "ios": "6.0"
    },
    "requires_arc": true,
    "source_files": "YXYNumberAnimationLabel/*",
    "frameworks": [
        "Foundation",
        "UIKit"
    ]
}

Pin It on Pinterest

Share This