ios - Swift Animate Background not working from a collection view cell -
I have this code to change the background of the collection view cell, but for some reason, this is not working .
UIView.animateWithDuration (2, animation: {() -> zero in self.backgroundColor = UIColor.blackColor ()})
Can you please help me?
"post-text" itemprop = "text">
property backgroundcolor
is not an animation for the cell, I guess. Which is exactly what you want to mix from one color to another
to set the color of a resolution backgroundView
and its alpha
is animate . You can also add your own ideas to the background as well and to make the change, you can enliven their alpha in opposite directions.
Still another solution is to drop and layer the layer at the Layer
layer and the back color.
UIView.animateWithDuration (2, animation: {() -> self in the layer .background color = UIColor.blackColor (). CGColor})
Comments
Post a Comment