This looks like it should work, but doesn’t. The color turns green at once.
self.labelCorrection.backgroundColor = [UIColor whiteColor];
[UIView animateWithDuration:2.0 animations:^{
self.labelCorrection.backgroundColor = [UIColor greenColor];
}];
I can’t find it documented anywhere, but it appears the
backgroundColorproperty ofUILabelis not animatable, as your code works fine with a vanillaUIView. This hack appears to work, however, as long as you don’t set the background color of the label view itself: