Instead, if you tried using a crossfade transition on the object itself, like this, it will give you a nice fade effect from one color to another:
[UIView transitionWithView:myLabel duration:0.25 options:UIViewAnimationOptionTransitionCrossDissolve animations:^{ myLabel.textColor = NEW_COLOR; } completion:^(BOOL finished) { }];
This is better than using NSTimers, CATextLayers, etc. etc. for various reasons. CATextLayer does not have proper text kerning or NSAttributedText support, and NSTimers does not have lags (plus too much code). The above transition animation does the trick, and can also be used in chain animation. I had the same problem, and I already tried the solutions above, but this simple code works wonders.
strange Jan 2 '14 at 10:13 2014-01-02 22:13
source share