ios - Unwind Segue Programmatically - New twist -


context: have 2 vc, , b. vc contains several buttons , several labels. when pressing button in vc a segue display vc b/c/ , forth. now, when finished vc a/b/c forth, segue being unwind vc appears. of vc b/c/d forth, using unwind method trigger through button in vc (ctrl + drag "exit" icon). works perfect, because upon returning vc a, following action being called automatically:

- (ibaction)returned:(uistoryboardsegue *)segue { // here stuff  } 

problem: now, in 1 of secondary vcs (e.g. d), things bit special. in vc generate hundred buttons through loop programmatically, detect button being pressed , unwind vc (without specific button; of buttons trigger unwind). know can eg using this

[self dismissviewcontrolleranimated: yes completion: nil] 

but not trigger above action when returning vc a, or using this

[self performseguewithidentifier:@"unwindsegueidentifier" sender:self] 

but generate new instance of vc a, not want (because labels in instance of vc contains information).

so, want able return same instance of vc generated vc d, , trigger "returned" action listed above. thus, want achieve same effect when using button connected "exit" icon, want programmatically "inside code" when 1 many buttons in vc d pressed.

any thoughts?

[self performseguewithidentifier:@"unwindsegueidentifier" sender:self] should work fine. unwind segues not create new instances of destinations, no matter how they're performed. unique in it's segue not create new instance of destination.


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -