How to animate UIView from top to Middle of viewController

It look nice if you put some UI elements like a login form inside a UIView on ViewController and animate UIView from top to Middle of screen when app starts.

In your .h file make an IBOutlet of your view as:

Give your view round corners and shadow as it looks good from the design perspective.

Next to animate we will use CABasicAnimation, implement it as:
In the code you can make some changes like duration and speed. Play with the code and try to change fromValue and toValue you’ll be able to animate it in other directions too.
Tags : animate UIView
Chaudhary Talha

The author Chaudhary Talha

I'm an iOS developer by profession and UI/UX designer by passion. All my tutorials are based on my personal experiences and whenever I learn something new I share it with the world.