unwind two segues from back button in swift
<p>I have a parent view controller where a user selects the game they want to play, then a child 1 view controller where the game is played, then a child 2 view controller which shows scores once the game is completed. How do I use the standard back button in child 2 view to get back to the parent view controller. I don't need to pass anything between the child 2 VC and the parent.</p>

<p>I have created an unwind segue in the parentVC</p>

<pre><code>@IBAction func unwindToParentVC(segue: UIStoryBoardSegue) {
}
</code></pre>

<p>And I have ctrl dragged from the yellow Child 2 VC icon onto the Exit icon and selected the above unwind segue, but I the back button doesn't seem to fire this segue.</p>

<p>I have read other solutions on SO that say I need to use</p>

<pre><code>override func didMoveToParentViewController(parent: UIViewController?) {
    }
</code></pre>

<p>But i am not sure how to get the back button to call this method, and what code I need to add in the body of the method. Any help on where I am going wrong much appreciated! </p>