I'm trying to duplicate the Secret App's Text Label transition. Does anyone the best way to approach it?
It looks like they have each letter start out as clear text color and then animate it to gray and then white text color.
Here are some screenshots:
Here is another solution https://github.com/zipme/RQShineLabel
I use CADisplayLink together with NSAttributedString that way we only need one UILabel, have a look :)
Thanks everyone for the help. I was able to get this working with some modification to keep the label fading in over and over. Here is my full source code: https://github.com/NatashaTheRobot/SecretTextAnimationExample
Here's a possible way.
First, let's note that a UILabel can hold and display an NSAttributedString. Using NSMutableAttributedString, you can make each letter a different color.
So, start with two labels, one right on top of the other (i.e. in front of it, hiding it), with the same text but different letter colorings. Now fade the alpha of the top one to zero, thus gradually revealing the one behind it. Thus each letter will seem gradually to assume the color of the letter behind it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With