mres mres - 6 months ago 26
Objective-C Question

Is it possible to animate UILabel's textcolor change?

UIView.animateWithDuration(5, animations: {
myLabel.textColor = UIColor.redColor()
})


Label textcolor just changes instantly

Answer

Try this

[UIView transitionWithView:myLabel duration:0.25 options:UIViewAnimationOptionTransitionCrossDissolve animations:^{
    label.textColor = [UIColor redColor];
} completion:^(BOOL finished) {
}];
Comments