What is actually animated in UILabel?

I am trying to revive a property backgroundColorof the UILabel class and have not yet succeeded. Here is a snippet of my code

-(void) blink {
  UIColor* originalColor = lblDescription.backgroundColor;
  lblDescription.backgroundColor = [UIColor yellowColor];

  [UIView beginAnimations:nil context:NULL];
  [UIView setAnimationDuration:1.0];
  lblDescription.backgroundColor = originalColor;
  [UIView commitAnimations];
}
//this code works if lblDescription is UIView and does not if UILabel

I found some allegations that some UILabel properties are not animated, but I could not confirm this assertion by reading Apple docs. I was wondering if anyone could shed some light on this issue.

+5
source share
2 answers

In this page of the View Programming Guide for iOS , “Table 1-2 Animation Properties” presumably lists all the animation properties of UIViews. It does not include backgroundColor.

UIView backgroundColor :


. nil.

, UILabel backgroundColor .

, , CATextLayer UILabel.

+4

All Articles