title: Current visible view controller checking
body: <p>I am checking from my <code>AppDelegate</code> class whether my <code>ParentEndViewController</code> is currently the visible class or not.</p>
  
  <pre><code>UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard_iPhone" bundle: nil];  
  ParentEndViewController *parent = [storyboard instantiateViewControllerWithIdentifier:@"ParentEndViewController"];
   if (parent.isViewLoaded &amp;&amp; parent.view.window){
           UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:displayName
                                                              message:body
                                                             delegate:nil
                                                    cancelButtonTitle:@"Ok"
                                                    otherButtonTitles:nil];
          [alertView show];
          NSLog(@"current view is parent!");
      }
      else{
          NSLog(@"current view is not parent!");
      }
  </code></pre>
  
  <p>It is printing that <code>current view is not parent!</code>". But I am sure that the current view running on my app is <code>ParentEndViewController</code>, i.e it should print <code>current view is parent!</code>. </p>
  
  <p>Where is  the problem? </p>