What is the difference between Modal and Push segue in Storyboards?

A push Segue is adding another VC to the navigation stack. This assumes that VC that originates the push is part of the same navigation controller that the VC that is being added to the stack belongs to. Memory management is not an issue with navigation controllers and a deep stack. As long as you are taking care of objects you might be passing from one VC to another, the runtime will take care of the navigation stack. See the image for a visual indication:
NavStack

A modal Segue is just one VC presenting another VC modally. The VCs don’t have to be part of a navigation controller and the VC being presented modally is generally considered to be a “child” of the presenting (parent) VC. The modally presented VC is usually sans any navigation bars or tab bars. The presenting VC is also responsible for dismissing the modal VC it created and presented.

Hope this helps.

Leave a Comment