I have a label which pops up displaying points in my application. I am using the following code to make the label get larger in scale, then smaller. I would also like to animate the color changing from purple to green. Can someone point me to a resource in achieving this?
mLabel.textColor = [UIColor purpleColor];
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:1.0];
[UIView setAnimationDelegate:self];
mLabel.transform = CGAffineTransformMakeScale(1.5,1.5);
[UIView setAnimationRepeatCount:1];
mLabel.transform = CGAffineTransformMakeScale(0.5,0.5);
mLabel.textColor = [UIColor greenColor];
[UIView commitAnimations];
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…