Since iOS7 we can create custom transition from view controller to view controller using UIViewControllerTransitioningDelegate which allows fine grained transitions.
viewController.transitioningDelegate = transitioningDelegate;
I discovered that when using storyboard we already had the opportunity to create custom transitions using a custom UIStoryboardSegue
but it seems the only way to implement custom transition with a storyboard.
How can I implement a transition delegate while using storyboard ?
Check http://www.teehanlax.com/blog/custom-uiviewcontroller-transitions/.
The idea is to use - prepareForSegue:
to set the transitioningDelegate
and the modalPresentationStyle
to UIModalPresentationCustom
. Then your transitioning delegate will have to take care of the transition.
Check out the following example: https://github.com/soleares/SOLPresentingFun
It's an implementation of the sample code for WWDC Session 218: Custom Transitions Using View Controllers. It uses storyboards.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With