Last active
June 17, 2018 13:07
-
-
Save boherna/226a52bb539796da8302 to your computer and use it in GitHub Desktop.
To animate (fade) text change in UILabel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CATransition *animation = [CATransition animation]; | |
animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; | |
animation.type = kCATransitionFade; | |
animation.duration = 0.75; | |
[aLabel.layer addAnimation:animation forKey:@"kCATransitionFade"]; | |
// The current text will fade to new text. | |
aLabel.text = @"new text"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment