title: iOS - How to check if a modal view is present
body: <p>Is there a way to check if a modal view is present? I'd like to run a method only if a modal view is present. Also, if I have multiple modal views, is there a way to check if a certain modal view is present.</p>
  
  <p>I use the following code to present and dismiss modal views:</p>
  
  <pre><code>    [self presentModalViewController:myModalView animated:YES];
      [self dismissModalViewControllerAnimated:YES];
  </code></pre>
  
  <p>Thank you in advance!</p>
  
  <p>Cheers,
  Evan</p>
  
  <p>PS. My modal view has a view controller, but I'd like to check if the modal view is present from a separate class that is running asynchronously.</p>