title: Adding and removing subviews in series
body: <p>I am having difficulty managing the views in my app, and would appreciate anyone providing some clarification. In my mind, the program is structured as a hierarchy in the following manner.</p>
  
  <pre><code>    BNG_AppViewController:UIViewController  
  </code></pre>
  
  <p>-calls-</p>
  
  <pre><code>    NameListSelectionController:UIViewContoller
  </code></pre>
  
  <p>-calls-</p>
  
  <pre><code>    GameViewController:UIViewController
  </code></pre>
  
  <p>-calls-</p>
  
  <pre><code>    NameResultsController:UIViewController
  </code></pre>
  
  <p>All of the subviews, which are built using XIBs from the interface builer are called in a manner identical to the following:</p>
  
  <pre><code>    NameListSelectionController *NameListSelectionControllerScreen = [[NameListSelectionController alloc] initWithNibName:@"NameListSelectionController" 
                bundle:nil];
      [self.view addSubview:NameListSelectionControllerScreen.view];
  </code></pre>
  
  <p>When I want to move up my view hierarchy, I use a call identical to the following from within the controller class -- usually using a button to trigger the call.</p>
  
  <pre><code>    [self.view removeFromSuperview];
  </code></pre>
  
  <p>Using this method, I can move up and down my hierachy in a linear fashion.</p>
  
  <p>However, what I would like to be able to do is, when I am moving back up my heirarchy, skip the 2nd level controller (i.e., NameListSelectionController above) and go directly from the 3rd level to the 1st level.</p>
  
  <p>Thus far, I've tried removing the 2nd level view from the hierarchy when calling my third level on my way down the hierarchy, to no avail.</p>
  
  <pre><code>    [self.view removeFromSuperview];
      gameScreen = [[GameViewController alloc] initWithNibName:@"GameViewController" bundle:nil];
      [self.view addSubview:gameScreen.view];
  </code></pre>
  
  <p>However, I seem to end back up at my 1st level, without any obvious effect to the second and third lines of the code.  I've also tried sending the 2nd level of the hierarchy to the back, without any results.</p>
  
  <p>I'd appreciate any pointers in the right direction, including any big picture ideas for how to revise the structure of my program.  I need to direct the user in the linear fashion described above, but I don't know that I need the program to be built that way. </p>
  
  <p>I did read all the documentation on subviews and the removeFromSuperview call I could find, but did not see a method for doing what I wanted or I did not understand what I read.  I did look into the possibility of using a NavigationController, but that didn't seem to offer any advantages given what I was trying to do (or maybe I couldn't see them).</p>