Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Something like this should work:</p> <pre><code>#import "ParentViewController.h" #import "EmbeddedTableViewController.h" @interface ParentViewController () @property(strong, nonatomic) EmbeddedTableViewController *eTableViewController; @end @implementation ParentViewController -(void)viewWillAppear:(BOOL)animated { self.eTableViewController.parentNextButton = self.nextButton; } -(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { self.eTableViewController = segue.destinationViewController; } @end @interface EmbeddedTableViewController : UITableViewController @property(nonatomic, strong) UIButton *parentNextButton; @end #import "EmbeddedTableViewController.h" @interface EmbeddedTableViewController () @end @implementation EmbeddedTableViewController -(IBAction)doSomething:(id)sender { self.parentNextButton.enabled = YES; } @end </code></pre> <p>Basically, you capture your EmbeddedTableViewController from the embed segue in the prepareForSegue delegate call in your parent view controller and then in viewDidAppear, you set the parentNextButton in your tableview controller to the parents nextButton. This will take care of the enabling/unenabling of the next button. </p> <p>As for your "action in the RootViewController", your description of what you are trying to do is a bit unclear to me. I am guessing that the values to be filled in are in the table view. If so, put all your logic in your embedded tableview controller and toggle the enabled state of the next button as needed.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload