Changing View Controllers Behind a Modal View Controller
<p>I want to create something similar to done/edit page for the Contacts app. It seems that there is a change in a view behind a modal view, however I'm not sure how that produce that behavior.</p>

<p><strong>Here is what I've looked at so far:</strong></p>

<p><a href="https://stackoverflow.com/questions/22184826/ios-switch-view-controller-behind-current-modal-view-controller">iOS: Switch view controller behind current modal view controller?</a> It seems like this post has a correct answer. However, I'm not sure what he means by <code>making the root view controller a delegate of the modal view</code> and what it means to <code>call a delegate method</code>.</p>

<p><strong>Here is what I want to accomplish:</strong></p>

<p>Imagine a vc1 that is embedded in a navigation controller. I tap a button on vc1 which causes vc2 to be presented modally. When you press "Done" on vc2, it dismisses the modal view, vc2, and presents vc3. When you tap a back button on vc3, it goes back to vc1.</p>

<p><strong>Here is the current behavior:</strong></p>

<p>I can make vc2 show on top of vc1 modally. But when the "Done" button is pressed on vc2, it just goes back to vc1 instead of going to vc3 then, when tapped "Back", goes to vc1.</p>

<p><strong>Here is what I've tried already:</strong></p>

<p>I tried segue from vc1 to vc3 without animation, and then modally segue to v2. This kind of works with extremely ugly transition and it causes this <code>Presenting view controllers on detached view controllers is discouraged</code> error to show. Also, I've tried different combinations of <code>unwindToSegue</code> methods, but I couldn't figure that out either.</p>

<p>Any help would be much appreciated! Thank you so much for your time :)</p>