title: How to stop a ViewController
body: <p>I have an application that can be started from the web via a URI scheme, that I have registered in my app. Depending on the URI, I open different view controllers (by setting the rootViewController in AppDelegate). Each view controller asynchronously gets some initialization data from a server upon initialization.</p>
  
  <p>My problem is: If my server responds slowly and I go out of the application and enter the application again (causing a new view controller to open), then the first view controller still exists in the background and receive the server response for the request that it sent. This can cause an alert to be shown by the first view controller, even though that view controller is no longer in focus.</p>
  
  <p>I <em>could</em> fix this by setting a flag in the viewDidDisappear: method. But this kind of handling messes up the code, and it would be much nicer if I could somehow stop the view controller from the AppDelegate. Or at least ensure that it only displays an alert view if it is in the foreground. Is there any way to do one of these things?</p>