title: Getting the top most UIViewController
body: <p>If I push view controllers and/or present modal view controllers on a <code>UINavigationController</code>, how can I find out what is the top most <code>UIViewController</code>? Or in my case, I want to know if a certain <code>UITableViewController</code> is the top most or not.</p>
  
  <p>I tried using:</p>
  
  <pre><code>self.navigationController.topViewController == self
  </code></pre>
  
  <p>... but this doesn't work. I'm guessing that it's failing because I'm presenting modal view controllers on top of it and that the <code>topViewController</code> only keeps track of which views were pushed on the <code>UINavigationController</code> (as opposed to those that were presented modally).</p>