Animations ✨

Mansi Shah
If let swift = Programming!
1 min readDec 16, 2017

--

So, I’ve always liked to add animations in my apps, because I believe animations always draw more attention than our regular transitions from one screen to another.

Here’s the code to add a little animation, using Apple’s CATransition, for navigation between controllers

  1. Make an extension like below to add transition

Try different combos with type and subtype of CATransition() here, you’ll like to watch your screen 😀

2. Call addTransition() as below while you perform the push and pop operations

and voila!

Similiarly, for presenting a view controller with some fancy animation, you could simply specify the modalTransitionStyle while presenting your controller

and see how these babies dance ✨

Flip
Curl

Aren’t they wonderful? 😍

👉🏼 In case, you want to check out the repo

And don’t hesitate to 👏🏼 if you liked it ☺️

--

--

Mansi Shah
If let swift = Programming!

I am a software engineer and an expat who loves anime, photography, travel, and learning new cultures over coffee and cheesecake. I enjoy speaking & writing ❤️