Nicolas Manzini
Nicolas Manzini

Reputation: 8546

iOS7 Implement UIViewControllerTransitioningDelegate with Storyboard

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 ?

Upvotes: 5

Views: 6248

Answers (2)

Jesse
Jesse

Reputation: 1697

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.

Upvotes: 3

Fábio Oliveira
Fábio Oliveira

Reputation: 2346

Check http://www.teehanlax.com/blog/custom-uiviewcontroller-transitions/.

The idea is to use - prepareForSegue: to set the transitioningDelegate and the modalPresentationStyleto UIModalPresentationCustom. Then your transitioning delegate will have to take care of the transition.

Upvotes: 3

Related Questions