title: UINavigationController - Pop
body: <p>I am having some problems with popping items from the navigation stack and no idea why its behaving like it is.</p>
  
  <pre><code>Stack
  A classA
  B classB
  C classC
  D classD
  </code></pre>
  
  <p>At stack D I create another classD and add it to the stack.</p>
  
  <pre><code>Stack
  A classA
  B classB
  C classC
  D classD
  E classD
  </code></pre>
  
  <p>Before I create E and push it on to the stack, I do a pop to get rid of D so that the stack becomes </p>
  
  <pre><code>Stack
  A classA
  B classB
  C classC
  E classD
  </code></pre>
  
  <p>However when I pop, the self.navigationController.viewcontrollers becomes 0 and im stuck on C with E not becoming visible. Why does the pop just remove everything and go to C?</p>
  
  <p>At C in didSelectRowAtIndexPath I create a ClassD and do:</p>
  
  <pre><code>[self.navigationController pushViewController:ClassD animated:YES];
  </code></pre>
  
  <p>At D in didSelectRowAtIndexPath I create another ClassD and do:</p>
  
  <pre><code>[self.navigationController popViewControllerAnimated:NO]; //remove current and replace with new
  [self.navigationController pushViewController:ClassD animated:YES];
  </code></pre>
  
  <p>But it doesn't seem to do what as expected. I sense the transition from pop to push seems to be too fast nothing is appearing? Any ideas? </p>