ios - how to unwind segue to the view controller that called it -


below great answer of how use apple's unwind segue.

what unwind segues , how use them?

my problem answer have explicitly tell storyboard view controller want exit (unwind) to. i'm trying exit (unwind) whichever view controller called it, using 1 button.

let's have 3 view controllers: red, blue, , yellow. both red , blue have button on them go yellow view controller, yellow has 1 button, return. possible have yellow return button unwind whichever view controller called it?

thanks @luk2302 able figure out. no need use unwind segue. luk2302!

@ibaction func returnviewcontroller(sender: anyobject) {     if((self.presentingviewcontroller) != nil){         self.dismissviewcontrolleranimated(true, completion: nil)     } } 

Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -