title: Switching view controllers without navigation controller
body: <p>I'm sure this has been asked countless times, and I've seen similar questions though the answer still eludes me.</p>
  
  <p>I have an application with multiple view controllers and as a good view controller does its own task. However I find myself stuck in that I can't switch from one view controller to another. I've seen many people say "use a navigation controller" but this isn't what I want to use due to the unwanted view elements that are part and parcel to view controller.</p>
  
  <p>I've done the following and have had limited success. The view controller is switched but the view does not load and I get an empty view instead:</p>
  
  <pre><code>- (IBAction)showLogin:(id)sender
  {
      PPLoginViewController *login = [[PPLoginViewController alloc] initWithNibName:@"PPLoginViewController" bundle:nil];
  
      PPAppDelegate *appDelegate = [UIApplication sharedApplication].delegate;
      appDelegate.window.rootViewController = login;
  
      [self.view insertSubview:login.view atIndex:0]; 
  }
  </code></pre>