ios - Perform a parent segue from the embedded view controller -
i have this:
mytableviewcontroller(inheritsuitableviewcontroller)- it has dynamic tableview few cells (foo, bar, qux)
- it has dynamic tableview few cells (foo, bar, qux)
myviewcontroller(inheritsuiviewcontroller)- there "show" segues controller other view controllers
- it has uicontainerview embeds mytableviewcontroller
a picture speaks thousand words:

when cell selected, want perform segue of parent view (myviewcontroller)
override func tableview(tableview: uitableview, didselectrowatindexpath indexpath: nsindexpath) { if (indexpath.section == 1 && indexpath.row == 1) { self.what.performseguewithidentifier("someshowsegue1", sender: self) } } is possible? should use in «what»?
in prepareforsegue: embedded segue set viewcontroller in new property in tableviewcontroller, let's name parentcontroller. , you'll have call self.parentcontroller.performseguewithidentifier().
edit: first of all, maybe can use existing parentviewcontroller if contains embedding view controller.
Comments
Post a Comment