title: Consequences of Bad Programming: dismissViewController vs popViewController
body: <p>I understand the difference between <code>dismissViewControllerAnimated:completion:</code> and <code>popViewControllerAnimated:</code>, as described <a href="https://stackoverflow.com/questions/11080091/dismissviewcontrolleranimated-vs-popviewcontrolleranimated">on Stack Overflow</a> and here:</p>
  
  <blockquote>
    <p><code>-dismissViewControllerAnimated:completion:</code> method is used to dismiss
    an UIViewController, which was presented by the method:
    <code>-presentViewController:animated:completion:</code>.</p>
    
    <p><code>-popViewControllerAnimated:</code> method of UINavigationController is used
    to pop a controller shown by <code>-pushViewController:animated</code> method of
    UINavigationController.</p>
  </blockquote>
  
  <p>I recently caught a mistake in my app, where I was using <code>[self dismissViewControllerAnimated:completion:]</code> to dismiss a VC that was presented with a push in a navigation embedded app. I french fried when I should have pizza'd. I didn't catch the mistake because everything worked fine and my VC was deallocated as expected.</p>
  
  <p><strong>My question:</strong> What are the consequences of mixing these two methods up?</p>