title: Switch UIViewController in a Tab Bar Controller Type Application
body: <p>Pardon the simple question, but I am pulling my hair out trying to get a grip around navigation in the iPhone.</p>
  
  <p>So, I have a Tab Bar Controller type application with UITabBar and 3 UITabBarItems.  I have the 1st Tab Bar Item loading a kind of "Home Screen/Welcome", on the Home Screen, there is a button.  When the user clicks the button, I want to open a different UIViewController (LoginViewViewController) to allow the person to login.</p>
  
  <p>I am trying to basically, switch UIViewController and then when they have successfully logged in, I want to change the TabBarItems.</p>
  
  <p>This is the code that I have in the .m file on the ViewController that is connected to the 1st TabBarItem:</p>
  
  <pre><code>#import "LaunchViewViewController.h"
  #import "LoginViewViewController.h"
  
  @implementation LaunchViewViewController
  
  @synthesize myLoginViewViewController;
  
  - (IBAction)cmdRSVP_Click:(id)sender {
  
   //Try #1
   //[self addSubview:myLoginViewViewController.view];
  
   //Try #2
   //[[self navigationController] pushViewController:myLoginViewViewController animated:YES];
  
   //Try #3
   //LoginViewViewController *myLoginViewViewController2 = [[LoginViewViewController alloc] initWithNibName:@"LoginView" bundle:[NSBundle mainBundle]];
   //[self.navigationController pushViewController:myLoginViewViewController2 animated:YES];
   //[myLoginViewViewController2 release];
   //myLoginViewViewController2 = nil;
  
   //Try #4
   //This just changes my screen to all White (expect the TabBarNavigationController
   //[self.view removeFromSuperview];
   //[self.view insertSubview:self.myLoginViewViewController.view atIndex:0];
  
  
   // This displays without issue.
   [self displayMessage:@"RSVP Clicked":@"Switch to Login View"]; }
  </code></pre>
  
  <p>As, you can see, I have tried 4 different ways that I have seen in various tutorials.</p>
  
  <p>In try 1, 2, 3: Nothing happens (no crash or exception), but the Alert Message box is still displayed.</p>
  
  <p>In try 4, the screen area above the Tab Bar Controller changes to White and the Alert Message is displayed, but it never shows my other ViewController.</p>
  
  <p>Any help getting me on track would be great!!!</p>
  
  <p>Thanks in advance!
  Jason</p>