【发布时间】:2011-04-15 07:44:29
【问题描述】:
这看起来应该有效,但没有。颜色立即变为绿色。
self.labelCorrection.backgroundColor = [UIColor whiteColor];
[UIView animateWithDuration:2.0 animations:^{
self.labelCorrection.backgroundColor = [UIColor greenColor];
}];
【问题讨论】:
-
对于任何未来的读者来说,这不是特定于 UILabel,但要求是视图必须以背景颜色开头,即使该颜色是清晰的。您不需要在图层上设置动画,UIView.backgroundColor 工作正常,提供上述内容。
标签: ios iphone core-animation