14
votes

I have a basic idea what push and modal segues do. Push is used for Navigation Controller segues and Modal is the default one I've been using so far for a basic segue into another View Controller. I assume "modal" means nothing else can be going on/interrupting the segue?

Custom segues I guess are the most flexible/customizable/animatable.

I have no idea what "relationship" and "embed" segues do. Please let me know!

Thank you.

1

1 Answers

39
votes

A "relationship" segue is the segue between a container view controller and its child or children -- so, the initial controller of a navigation controller, the view controllers in the tabs of a tab bar controller, and the master and detail controllers of a split view controller.

An "embed" segue is the segue between a container view and the controller that's embedded in that container view that you get automatically when you add a container view to a controller's view.

Both of these segues are executed as soon as the parent controller gets instantiated. You do not call them, but you can implement prepareForSegue, and pass information to the destination view controller.