Kodeco Forums

iOS Animation Tutorial: Custom View Controller Presentation Transitions

Learn how to create custom view controller presentation transitions and spice up the navigation of your iOS apps!


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/1555-ios-animation-tutorial-custom-view-controller-presentation-transitions

hi. very nice!

two things:

  1. can I see what a completely generic version of this would look like for toView and fromView? just two views that are already in a storyboard?

  2. I noticed that the way that the details which appear once the subview has expanded to full size (herb name and explanation) are not animating, but instead just unceremoniously disappearing after the detail view has shrunken back down… can i see how that would look to add the code to make that look a little nicer?

Where/when does UIPresentationController come in?

hey mrjre - this a post about custom view controller presentation transition animation, if you’re looking for info about UIPresentationController check the Apple docs about it: Apple Developer Documentation

Here is what I came for the hiding and unhiding of the description in the Herb Detail View Controller.

*The project is written in Swift 3.0

Hi

I’ve seen that if you rotate the device to landscape while showing a herb detail, when you hide the detail the original view frame is wrong… any way to fix this?

Thank you

Hi
I want to transition to a ViewController from a Container View. when I dismiss the View Controller the transitionContext.view(forKey: UITransitionContextViewKey.to)! returns nil

Is there any way to prevent this?

not sure how transitions work in container views, I haven’t had the chance to try that

I have another problem. I want to do such transition from a table view. When I touch a specific table cell the cell must fade out but it’s image should begin transition like your example.
My problem is wrong cell fade out when I do that.
Can you say where I do this wrong?

I tried two way, one in didSelectRowAtIndex find that cell and send it to transition class that didn’t work.
find view with tag in the transition class that hise the wrong cell.