title: Pop and push a view in a tab bar application
body: <p>All me to show this picture first so I can make reference to it.</p>
  
  <p><img src="https://i.stack.imgur.com/cjymb.png" alt="My application screenshot"></p>
  
  <p>Basically what I would like to achieve is as you can see the tab first has been selected, and a view is being displayed. I have a button which has a "-,-" on it, and what I would like to do, is when that button is clicked, it pops the view from this tab, and pushes another view. I am able to change the view by doing this:</p>
  
  <pre><code>FourthViewController *home = [[FourthViewController alloc] initWithNibName:@"FourthView" bundle:nil];
  [self presentModalViewController:home animated:YES];
  [home release];
  </code></pre>
  
  <p>But I lose the tabs down the bottom :&lt; as the example below will show:</p>
  
  <p><img src="https://i.stack.imgur.com/BeCf6.png" alt="enter image description here"></p>
  
  <p>I'm not sure which direction to head BUT I have tried this and it failed:</p>
  
  <pre><code>UINavigationController *navController = self.navigationController;
  // retain ourselves so that the controller will still exist once it's popped off
  [[self retain] autorelease];
  // Pop this controller and replace with another
  [navController popViewControllerAnimated:NO];
  [navController pushViewController:home animated:NO];
  </code></pre>
  
  <p>I've also tried this:</p>
  
  <pre><code>FourthViewController *home = [[FourthViewController alloc] initWithNibName:@"FourthView" bundle:nil];
  [self.navigationController pushViewController:home animated: YES];
  [home release];
  </code></pre>
  
  <p>Can anybody help me with this?</p>