iosuiviewcontrollersegueunwind-segue

When to used 'show' and 'unwind' segues?


I am building an app with 6 ViewController (lets call them A, B, C, D, E and F). A is the "Menu" ViewController.

From A you can reach B or F.
From B you can go back to A or go on to C.
From C you can go back to B or go on to D.
From D you can go back to C or go on to E.
From E you can NOT go back to D, but you can go back to A or to B.
From F you can only go back to A.

here u can see the "storyboard"

The question

Which segues should be 'show' segues and which segues should be 'unwind' segues? Or is there maybe something else I should use?


Solution

  • Show - forward

    unwind - backward

    So for e.g. -

    when moving from A -> B use show

    now when coming back i.e. B -> A use unwind.