title: How to check if a specific UIViewController's view is currently visible?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/2777438/how-to-tell-if-uiviewcontrollers-view-is-visible">How to tell if UIViewController&#39;s view is visible</a>  </p>
  </blockquote>
  
  
  
  <p>I'm developing an app that processes a constant stream of incoming data from the network and provides a number of different UIViews for the user to view that data.</p>
  
  <p>When certain model data gets updated based on the incoming stream from the network, I access the associated UIViewController or UITableViewController and do -setNeedsDisplay on it (in the case of UIViewController) or -reloadData (in the case of UITableViewController).</p>
  
  <p>Is there a way to check if a given UIView is currently being displayed (beyond just being loaded) so that I only do -setNeedsDisplay or -reloadData if the user is currently looking at that UIView?  It would seem that calling -setNeedsDisplay or reloadData on a view that the user is not currently looking at is a waste of processing power and wouldn't be good for battery life.  When the user eventually switches over to a view that previously got updated, doing -setNeedsDisplay or reloadData on the -viewWillAppear would make more sense.</p>
  
  <p>Thanks</p>