Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Generally speaking a navigation controller maintains a stack of viewControllers that you push and pop onto. If you are using IB when you drag a Navigation Controller from the library into you application window it will actually add a number of objects including a UIViewController that will act as the Root View Controller. Change the class of that root view controller to be the class of your first view controller. </p> <p>You can create additional view controllers (I would put these other view controllers in separate NIB files) which you then push onto the view controller stack when you want to make them visible. You don't need to link them to the navigation controller in IB.</p> <p>So for example to push a new view controller onto the stack you would have some code something like this (the view controller is loaded from DetailView.xib:</p> <pre><code>DetailViewController *viewController = [[DetailViewController alloc] initWithNibName:@"DetailView" bundle:nil]; viewController.someAttribute = someValue; [[self navigationController] pushViewController:viewController animated:YES]; [viewController release]; </code></pre> <p>If you are using UITableViewControllers you might put this code in the didSelectRowAtIndexPath:indexPath method so that the new view controller appears when the user selects a row in the table.</p> <p>The navigation controller will take care of popping the top view controller when the user taps the back button or you can pop it yourself by calling popViewControllerAnimated:</p> <pre><code>[[self navigationController] popViewControllerAnimated:YES] </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

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