-1

In VC-A I have a IBAction called "unwindToMain". A second VC, VC-B, is loaded and then a third VC. In VC-C I call that unwind function from a button press.

The problem is that VC-B appears to be loaded during the unwind. I added some print() statements to help debug and I can see VC-B code, including the tableview functions, getting run after the button click, before I arrive at VC-A.

Why is this happening and how do I stop it? Thanks in advance!

Dave G
  • 12,042
  • 7
  • 57
  • 83
  • Because VC-A is the destination. VC-C is the trigger. VC-B is essentially in the way, lol. Isn't that how unwinds work? The unwind IB goes in the destination VC? @MichaelChawla – Dave G Jan 05 '16 at 16:05

1 Answers1

0

This is how unwind segues work. You get from C to get to A by going through B. The only solution that I can think of is creating a prepareForSegue method going from C to A.