One of the best ways of really learning iOS and / or any other programming language is to replicate what some of the best app developers do in their app. Ever since I downloaded Secret, I’ve been pleasantly surprised by their awesome text animation when a new secret loads:

So over the past day, I’ve been working on replicating it. I create a UILabel and played around with setting an NSAttributedString at the label’s text, but got stuck there. So I posted a question on StackOverlow, and immediately got a new lead (love StackOverflow!).

To make this animation work, I needed to set two labels on top of each other and then have one label fade while the other one became visible. One person even provided some code on how to do part of it! So after playing around with different versions of this, I ended up with something that looks very close to Secret’s text animation (at least I hope so!):

Continue Animating

Finally, this is the harder part. Now that you have the initial letters on the screen, all with different opacities of white or a clear color, you need to keep doing this same animation over and over again until all the letters are fully white.

Well, what looks like a simple and elegant animation on the outside actually takes some serious brain power and time to actually make! Kudos to the Secret iOS developers and designers for making it happen!

Are there any other cool animations or UI elements you’ve noticed in an iOS app recently? Let me know in the comments and I’ll try to replicate it 🙂