title: How to switch from one UIViewController to another?
body: <p>I have a problem with switching from one viewcontroller to another.</p>
  
  <p>Here is what I have :</p>
  
  <p>In my "AppDelegate_iPad.m" :</p>
  
  <pre><code>- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 
  {    
  
      CGRect frame = [UIScreen mainScreen].bounds;
      window = [[UIWindow alloc] initWithFrame:frame];
      window.backgroundColor = [UIColor blackColor];
  
      LoginViewController_iPad *loginView = [[LoginViewController_iPad alloc] initWithNibName:@"LoginViewController_iPad" bundle:nil];
      [window addSubview:loginView.view];
  
  
      [self.window makeKeyAndVisible];
  
      return YES;
  }
  </code></pre>
  
  <p>That works. Now I have a login button on that screen and when pressed it calles this :</p>
  
  <pre><code>- (IBAction)doPressLoginButton
  {
      DebugLog(@"doPressLoginButton");
  
      MenuViewController_iPad *menuView = [[MenuViewController_iPad alloc] initWithNibName:@"MenuViewController_iPad" bundle:nil];
      [self.navigationController pushViewController:menuView animated:YES];
      [menuView release];
  
  }
  </code></pre>
  
  <p>The problem is that nothing happends. I assume I am missing the actual navigationconroller ?!</p>
  
  <p>Hope that anyone can help. </p>
  
  <p>Thank you</p>