November 13, 2015 - No Comments! Swift Text Transition Trick A little trick I learnt today to change the text of a label with a crossfade... let animation = CATransition() animation.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseOut) animation.type = kCATransitionFade animation.duration = 0.5 self.label.layer.addAnimation(animation, forKey: "kCATransitionFade") self.label.text = "new copy" Published by: nick in IOS/ XCode, Swift Facebook Share on Facebook Twitter Share on Twitter Google+ Share on Google+