UILabel background UILabel not animated, but UILabel background UILabel . Therefore, do not set the foreground color, otherwise it will hide the color of the layer. Just make the main background transparent so that the layer shows.
myLabel.backgroundColor = UIColor.clearColor()
If you need to set the initial color, you can do it as follows:
myLabel.layer.backgroundColor = UIColor.blueColor().CGColor
Then, to animate this color to a new one, you can do the following:
UIView.animateWithDuration(1.0, animations: { self.myLabel.layer.backgroundColor = UIColor.redColor().CGColor })
This answer is in Swift, but the idea is the same.
source share