How we can implement the new push view controller animation which have come in App Store's Today feature in IOS 11

Viewed 284

What is the best way to create a custom UIViewController transition that on the first VC for example there is an image, and when you tap on it, it rises to the top of the screen and some other UI components (like labels and textViews) are added to the screen?

I want to achieve something like what Apple did on the new "Today" tab on the App Store.

2 Answers

enter image description here

If this is what you want, I will update both this answer and the demo serveral hours later. I write the demo in a hurry, so apologize for the ugly UI and the code style.

The demo project is on Github.

If you are familiar with the transition, then the key trick here is you just need to add an animation view to the top of the UIViewControllerContextTransitioning.container and move it to the position where it would be displayed in destination view controller. When you complete the transition, just remove this animation view directly or by animation.

Related