Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>There are a couple of things going on here worth noting.</p> <ul> <li>In didSelectRowAtIndexPath, you're creating a view controller but you don't present it so there's no visible side effect. The typical thing done to present a "detail" view controller from a table view is this:</li> </ul> <p></p> <pre><code>MenuItemOrderVC *vc = [[MenuItemOrderVC alloc] initWithNibName:@"MenuItemOrderVC" bundle:nil]; [self.navigationController pushViewController:vc animated:YES]; [vc release]; </code></pre> <p>This creates a new instance of the view controller class, and presents it by pushing on to the stack of the navigation controller. That's the usual way to show a detail view.</p> <p>If what you're trying to do is really present the data on a different view controller that already exists (and is hidden at the moment?), then you should not be allocating a new RootViewController (given the name, you probably shouldn't create more than one, usually the "root" view controller is the base of your VC stack and only one exists throughout the application, but that's not a hard and fast rule). Instead, you will need a way to get the object pointer to your already existing RootViewController. </p> <p>You'll need to either pass down the RootViewController object from ViewController to ViewController, or put it in some globally accessible place, like in your app delegate subclass, and do something like this:</p> <pre><code>MyAppDelegate *appDel = (MyAppDelegate *) [[UIApplication sharedApplication] delegate]; RootViewController *rvc = appDel.rootViewController; </code></pre> <p>If you can comment on which of these two options you were thinking of, I can give a more directed answer.</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