WYCountingLabel 0.3.0

WYCountingLabel 0.3.0

测试已测试
Lang语言 Obj-CObjective C
许可证 MIT
发布最新发布2017年4月

wangyan维护。



  • wangyansnow

一款使用 CoreAnimation 实现动画数字变动效果的库

安装

  • 1.cocopods
    • pod 'WYCountingLabel'
  • 2.手动导入
    • WYCountingLabel 整个文件夹拖入您的项目中即可

如何使用 WYCountingLabel

格式化 Label

__weak typeof(self) weakSelf = self;
WYCountingLabel plusLabel = [[WYCountingLabel alloc] initWithFrame:CGRectMake(20, 100, 100, 30)];
[self.view addSubview:plusLabel];
[plusLabel setWy_FormatBlock:^NSString *(double wy_number) {
	NSString *str = [NSString stringWithFormat:@"%.2f元", wy_number];
	return str;
}];
plusLabel.wy_number += 10;    

从数字到数字的动画效果

WYCountingLabel plusLabel = [[WYCountingLabel alloc] initWithFrame:CGRectMake(20, 100, 100, 30)];
[self.view addSubview:plusLabel];
[plusLabel countFrom:0 to:1576 duration:2.0];

作者

wangyansnow, [email protected]

许可证

WYCountingLabelDemo 遵循 MIT 许可证。有关更多信息,请参阅 LICENSE 文件。