3
votes

I want to extend the view controller to have an unwind segue. I know how to create an unwind segue via the storyboard but I do not want to create an unwind segue for every view controller.

I already know how to do this, what I am asking for is how to do this programatically: I already know how to do this, what I am asking for is how to do this programatically Thanks.

Please read comments

1
What I am trying to say is that I already know what you sent me, I already know how to create a segue by using the storyboard and then hook it up programatically. What I want a solution done 100% with code.luis
What you are asking doesn't really make sense, all segues are created through the storyboard, they are just XML elements in the storyboard file; regular or unwind. You can trigger them programatically, but you can't create them.Paulw11
It does make a ton of sense for a view controller that;s created programmaticallyAnton Tropashko

1 Answers

0
votes

You can't. An unwind segue can be created only from Interface Builder, but can be triggered programatically. It least for now.

Technical Note TN2298 - Using Unwind Segues

There is no direct indication of the fact that it is forbidden, but the document describes only the one way to create unwind segue. Well, I've never heard or seen the solution to create unwind segue programatically too.