Created
August 14, 2011 15:21
-
-
Save darkseed/1144974 to your computer and use it in GitHub Desktop.
CABasicAnimation text animation
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
//Create a CABasicAnimation object. Must be added to the element after it is displayed | |
CATransition *animation = [CATransition animation]; | |
animation.duration = 1.0; | |
animation.type = kCATransitionFade; | |
animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; | |
[myLabel.layer addAnimation:animation forKey:@"changeTextTransition"]; | |
// Change the text and the animation will ocur | |
myLabel.text = @"Changed text"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment