title: why is self.navigationController.visibleViewController returning true on view controller that is not visible
body: <p>Currently, I have a navigation stack set up in the following manner:</p>
  
  <p><code>ViewController A</code> -> <code>ViewController B</code> -> <code>ViewController C</code> -> <code>ViewController D</code></p>
  
  <p>In the implementation code for both <code>ViewController</code> C and <code>ViewController D</code>, I have a selector that will only run through a code block if the following test is met</p>
  
  <pre><code>if (self.navigationController.visibleViewController)
  </code></pre>
  
  <p>The problem I am facing is that the above test is always returning true for <code>ViewController C</code>. First, I launch my application in the IOS simulator and I navigate up the stack all the way to View Controller D. Once <code>ViewController D</code> loads up, I press the "home" button on my simulator. After pressing the home button, I click on my app once again and relaunch my application (enters foreground). What occurs now is strange, the view controller that is visible to me is <code>ViewController D</code>, because that is the View Controller I was last at. Although <code>ViewController D</code> is now currently the only view controller that is visible to me, the above if statement is returning true for <code>ViewController C</code> as well! (I only want <code>ViewController D's</code> selector code to be executed, this is a problem).</p>
  
  <p>So this begs the question, what exactly does it mean to be a <code>visibleViewController</code> and how can I make it so that <code>ViewController C's</code> selector does not execute if <code>ViewController D</code> is the view controller that appears before me.. Thanks!</p>