仿剩余金额宝数字渐慢跳动效果

找到一个开源Demo:https://github.com/PigRiver/NumberJumpDemo

Demo里的都是整数间的跳转,想弄成带小数的跳转,非常easy,仅仅要到CATextLayer+NumberJump.m文件 里

changeNumberBySelector方法里改动成例如以下

float value = [(NSNumber *)[pointValues objectAtIndex:1] floatValue];就OK

原文地址:https://www.cnblogs.com/mfrbuaa/p/3932839.html