Difference between a custom UIStoryboardSegue and UIViewController transition Difference between a custom UIStoryboardSegue and UIViewController transition ios ios

Difference between a custom UIStoryboardSegue and UIViewController transition


Custom Segues are not just for defining the presentation styles but they can also be used for defining custom hierarchy of view controllers along with presentation styles--something different from Navigation or Tab bar view controllers.

The issue with using custom segue only for presentation is that developer is responsible for managing the view controller hierarchy also, which is not actually the intent.

With custom transitions API, presentation is separated from how view controllers are managed.


If you use storyboard segues and you want a custom transition, you would use a custom UIStoryboardSegue. But if you're using regular UIViewController methods for presenting new view controllers, you would use a custom UIViewController transition. In both cases, your previous view controller(s) still exist and you can go back if you desire. It just depends on which method you want to use to bring up a new view controller.


matomo