Fade background-color from one color to another in a UIView
How can I fade from one background-color to another color in a UIView? In javascript (jQuery) it can be done by doing the following: $('body').animate({ backgroundColor: "#ff00ff"}); Would it be easier if I converted the colors to HSV? EDIT: Tried to do it with CABasicAnimation but it flashes white for unknown reasons. :/ CABasicAnimation* fade = [CABasicAnimation animationWithKeyPath:@"backgroundColor"]; fade.fillMode = kCAFillModeForwards; fade.removedOnCompletion = NO; // fade.fromValue = (id)[self.view backgroundColor].CGColor; fade.toValue = (id)[UIColor greenColor].CGColor; [self.view