IOS/Objective-C: Animate tableviewcell color change

64 Views Asked by At

I am trying to animate the color change of a cell using the following code. However, the color changes instantly no matter what I set the duration to. For labels, an answer on SO said you need to first set to clear color and I've done that but still no success.

Can anyone suggest how to do this?

cell.backgroundColor = [UIColor clearColor];
 [UIView animateWithDuration:10.0 delay:0.2 options:0 animations:^{
 cell.backgroundColor = [UIColor greenColor];
 } completion:^(BOOL finished)
 {
 NSLog(@"Color transformation Completed");
 }];
0

There are 0 best solutions below