title: Better way to select view controller using popToViewController: animated:
body: <p>Consider:</p>
  
  <pre><code>[self.navigationController popToViewController:[[self.navigationController viewControllers]objectAtIndex:1] animated:YES];
  </code></pre>
  
  <p>Is there a better way to get index of the view controller to pop to?  This way if I do something to the nav stack, I don't have to go back and edit this.  I was thinking of maybe storing it in a ivar on the VC or using #define macros.  Any ideas?</p>
  
  <p><strong>Edit:</strong>
  The stack has four view controllers. I used this code to pop from the fourth to the second.</p>