Search code examples
iosios8uistoryboardsegueuiviewanimationtransition

Segues vs. UIViewControllerAnimatedTransitioning


While searching how to perform custom animations when transitioning from one controller to another I found some info about UIViewControllerAnimatedTransitioning.

So the question is: why do we even need this if we have custom segues? Are they interchangeable or not? If yes, why does Apple provide two ways of doing the same task?


Solution

  • Some differences:

    • Segues can only be used with storyboards.
    • Animator objects can be used programmatically, or along with segues.
    • Animator objects allow you to set a customized final position and size for your new view controller.
    • Animator objects can be configured to do special animations with navigation controllers and collection views.
    • Animator objects also allow interactive transitions using UIViewControllerInteractiveTransitioning, which segues don't.