animationUITextView增加或减less数字的值

我有一个UITextView显示一个值(例如“32039”)。 通常在我的应用程序中,我更改了该数字的值,但是想要dynamic增加或减less值。 我想到的animation就是这样的 。 我已经看到了这个问题,但是使用答案中描述的方法的唯一animation就是淡入/淡出,从左/右/向上/向上移动以及显示/推送。 有没有这个animation的UIKit或核心animation实现,甚至是在第三方库中的实现,还是我应该推出自己的?

/ /这样的事情会工作

@property (nonatomic, strong) UILabel *testLabel; @property (nonatomic, strong) NSTimer *timer; @property (nonatomic, assign) NSUInteger counter; - (void)viewDidLoad { [super viewDidLoad]; self.testLabel = [[UILabel alloc] initWithFrame:CGRectMake(50.0f, 100.0f, 80.0f, 25.0f)]; self.testLabel.text = @"44"; [self.view addSubview:self.testLabel]; self.timer = [NSTimer timerWithTimeInterval:.5 target:self selector:@selector(changeLabelText) userInfo:nil repeats:YES]; [[NSRunLoop currentRunLoop] addTimer:self.timer forMode:NSDefaultRunLoopMode]; [self.timer fire]; } - (void)changeLabelText { self.counter++; if (self.counter == 100000) { [self.timer invalidate]; } self.testLabel.text = [NSString stringWithFormat:@"%d", (44 + self.counter)]; }