3

My app has more than two storyboards. In storyboard A, it has navigation view controller, root view controller and several view controllers. It also has an unwind segue, like returnToTopScreen. Storyboard B has several view controllers. At execution, all VC in B is on the navigation stack.

My question is,

Can unwind segue work for inter storyboards unwinding?

According to my trial, Xcode6.2 allows a UIbutton in VC of storyboard B to connect with an unwind segue in storyboard A. But it does not work.

kmugitani
  • 615
  • 1
  • 6
  • 13

1 Answers1

2

Yes, you can unwind between storyboards as long as you got to the controller in the second storyboard by pushing or presenting from one of the controllers in the sequence that leads back to the one you want to unwind to. I tested this in a setup where the main storyboard had a navigation controller with its root view controller, and one other controller that was pushed to from the root. In that controller, I instantiated the controller in the second storyboard, and either pushed or presented it. An unwind from that controller in the second storyboard successfully went back to the root of the navigation controller.

rdelmar
  • 103,982
  • 12
  • 207
  • 218
  • 5
    This is a good answer but is very hard to read. A screen shot would go a long way to illustrate what you're describing. – Jason McDermott Jul 07 '15 at 01:32
  • @JasonMcDermott I don't know what screenshot you want to see . You create the unwind segue in exactly the same manner as if everything were in the same storyboard. – rdelmar Jul 07 '15 at 23:43
  • 1
    after following your comments closely, it worked exactly as described. Thanks – Jason McDermott Jul 11 '15 at 12:21