Created
August 22, 2017 15:04
-
-
Save AhiyaHiya/7c7d3c856a35ac539708a6fe87b31f7c to your computer and use it in GitHub Desktop.
Animate UILabel... pretty simply said.
This file contains hidden or 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
| // https://stackoverflow.com/questions/3073520/animate-text-change-in-uilabel | |
| // | |
| - (void)animate:(UILabel*)label with:(NSString*)text | |
| { | |
| CATransition* animation = [CATransition animation]; | |
| animation.timingFunction = | |
| [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; | |
| animation.type = kCATransitionFade; | |
| animation.duration = 0.75; | |
| [label.layer addAnimation:animation forKey:@"kCATransitionFade"]; | |
| label.text = text; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment