title: How UINavigationController and UIViewController works?
body: <p>I'm learning about <code>UINavigationController</code> and <code>UIViewController</code>s. Here is the simple app I build. Notice that I use ARC.</p>
  
  <p>My app have a navigation controller and two view controllers (let's call them <code>FirstViewController</code> and <code>SecondViewController</code>). When the app is launched navigation controller push the <code>FirstViewController</code> on the stack. </p>
  
  <p>In <code>FirstViewController</code> I have a button which push the SecondViewController when is touched. Here is some code.</p>
  
  <p><strong>FirstViewController.m</strong></p>
  
  <pre><code>-(IBAction)pushSecondViewController
  {
      SecondViewController *secondViewController = [SecondViewController alloc]init];
      [self.navigationController pushViewController:secondViewController animated:YES];
  }
  </code></pre>
  
  <p>In the second view controller I have a button which pop the current view controller from the stack.</p>
  
  <p><strong>SecondViewController.m</strong></p>
  
  <pre><code>-(IBAction)popViewController
  {
      [self.navigationController popViewControllerAnimated:YES];
  }
  </code></pre>
  
  <p>So far, so good. Here are my questions:</p>
  
  <p>Does the navigationController check for an existing instance of <code>SecondNavigationController</code> and if such not exist then it creates a new one?</p>
  
  <p>If not, should I use singleton to make sure that only one instance is created and reused instead of creating a new instance every time when the button which push the <code>SeconViewController</code> is touched?</p>