I am trying to find out what the difference is between a custom UIStoryboardSegue
and a custom UIViewcontroller
transition (introduced in ios7).
What are the differences and different use cases for both? As far as I can tell they are both used for custom moves to new controllers.
Possibly the UIViewcontroller
transitions are used more for a controller that is only shown and will some point be dismissed, whilst the segue is a complete move and not necessarily a back?
Custom Segues
UIViewControllerTransitioningDelegate Protocol Reference
Relationships segues are different from the other segues in that they are resolved at build time. When a UITabBarController is loaded from a storyboard, all of its constituent view controllers are already 'inside' of it in the same NIB that represents the scene with the tab bar controller.
To create a segue between view controllers in the same storyboard file, Control-click an appropriate element in the first view controller and drag to the target view controller. The starting point of a segue must be a view or object with a defined action, such as a control, bar button item, or gesture recognizer.
Present Modally - Presents a view controller overtop the current view controller in various fashions as defined by the modal presentation and transition style - most commonly used to present a view controller in a sheet that animates up from the bottom. Example: Selecting Face ID & Passcode in Settings.
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 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