Skip to content


Subversion checkout URL

You can clone with
Download ZIP
WWDC Session 218 Sample Code: Custom Transitions Using View Controllers
branch: master
Failed to load latest commit information.
SOLPresentingFun.xcodeproj Minor refactoring
SOLPresentingFun Fixed issue #3
.gitignore Initial commit
LICENSE Initial commit Updated requirements


SOLPresentingFun is sample code for WWDC Session 218: Custom Transitions Using View Controllers.

Apple didn't provide sample code for this session so it's recreated here for your perusal and enjoyment.

Storyboards are used as much as possible in this sample. This was done as an exercise and to verify that the new APIs worked with Storyboard segues.

Xcode 5 or later
iOS 7 or later




A custom transition that slides a view controller in from an edge.

The transition is implemented in SOLSlideTransitionAnimator.


A custom transition that slides a view controller in from an edge with bounce.

The transition is implemented in SOLBounceTransitionAnimator.


A custom transition that uses snapshots and keyframes to achieve a folding origami effect.

The transition is implemented in SOLFoldTransitionAnimator.

Flow 1

A standard interactive transition that animates between collection view controllers and includes a standard interactive pop gesture (swipe right).

It uses a new property useLayoutToLayoutNavigationTransitions on UICollectionViewController.


A custom modal transition that shows how to combine custom transitions with UIKit Dynamics.

The transition is implemented in SOLDropTransitionAnimator.


A custom modal transition that presents an in-app settings view controller.

The transition is implemented in SOLOptionsTransitionAnimator.


I came across the following issues with the new API:

  1. UICollectionViewController.useLayoutToLayoutNavigationTransitions doesn't work properly with storyboard segues. This is why I push the collection view controller programmatically instead of with a segue. It doesn't transition to the third collection view when using segues. I believe this is due to an SDK bug.

  2. The keyframe animation API sometimes animates a snapshot's alpha value at the wrong time. I worked around this in SOLFoldTransitionAnimator by scaling down bottomLeftSnapshot in Keyframe 4 of the dismiss animation. I would have preferred to just set it's alpha to 0 in a prior keyframe but that didn't work. I filed a radar for this.

  3. Normally an unwind segue will pop/dismiss the view controller. This doesn't happen for custom modal transitions so the view controller needs to be programmatically dismissed in the unwind segue action. See the comments for -[SOLViewController unwindToViewController:] for more details.

  4. For standard interactive transitions like Flow 1, the navigation controller delegate can't be set otherwise the standard interactive pop gesture (swipe right) breaks. See the comments for -[SOLViewController prepareForSegue:] for more details.

Something went wrong with that request. Please try again.