Monday, May 21, 2012

Animate UILabel text size increase and decrease

I want to apply animation on UILabel text. I write the code to increase font size in animation block but animation is not applied.



[UIView beginAnimations:nil context:nil/*contextPoint*/];
monthsOnBoard.font=[UIFont fontWithName:@"digital-7" size:150];
daysOnBoard.font=[UIFont fontWithName:@"digital-7" size:150];
hoursOnBoard.font=[UIFont fontWithName:@"digital-7" size:100];
minutesOnBoard.font=[UIFont fontWithName:@"digital-7" size:100];
secondsOnBoard.font=[UIFont fontWithName:@"digital-7" size:100];
[UIView setAnimationDelegate:self];
[UIView setAnimationDelay:0.5];
[UIView setAnimationDuration:1];
[UIView setAnimationRepeatCount:4];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView commitAnimations];




No comments:

Post a Comment