对UIFont大小的变化进行动画处理

| 有没有一种方法可以使某些文本的字体大小发生动画变化。我正在考虑从UIView的子类调用drawRect并以不同的大小绘制文本。     
已邀请:
您可以在任何包含标签的UIView上为转换设置动画。
[UIView beginAnimations:nil context:nil];
label.transform = CGAffineTransformMakeScale(1.5,1.5);
[UIView commitAnimations];
这样可以将文本放大到150%。如果太大,可能会变得块状。     
你有尝试过吗?
[UIView beginAnimations:nil context:self.view];
[UIView setAnimationDuration:0.5];
label.font = [UIFont font...]; //try setting the font and the size you want
[UIView commitAnimations];
    

要回复问题请先登录注册