title: UIAlertController is moved to buggy position at top of screen when it calls `presentViewController:`
body: <p>Presenting a view from a <code>UIAlertController</code> moves the alert to a buggy position at the top-left corner of the screen. iOS 8.1, device and simulator.</p>
  
  <p>We have noticed this in an app when we attempt to present a view from the current "top-most" view. If a UIAlertController happens to be the top-most view we get this behavior. We have changed our code to simply ignore UIAlertControllers, but I'm posting this in case others hit the same issue (as I couldn't find anything).</p>
  
  <p>We have isolated this to a simple test project, full code at the bottom of this question.</p>
  
  <ol>
  <li>Implement <code>viewDidAppear:</code> on the View Controller in a new Single View Xcode project.</li>
  <li>Present a<code>UIAlertController</code> alert.</li>
  <li>Alert controller immediately calls <code>presentViewController:animated:completion:</code> to display and then dismiss another view controller:</li>
  </ol>
  
  <p>The moment the <code>presentViewController:...</code> animation begins, the UIAlertController is moved to the top-left corner of the screen:</p>
  
  <p><img src="https://i.stack.imgur.com/ldxuDl.png" alt="Alert has moved to top of screen"></p>
  
  <p>When the <code>dismissViewControllerAnimated:</code> animation ends, the alert has been moved even further into the top-left margin of the screen:</p>
  
  <p><img src="https://i.stack.imgur.com/7FCqMl.png" alt="Alert has moved into the top-left margin of the screen"></p>
  
  <p>Full code:</p>
  
  <pre><code>- (void)viewDidAppear:(BOOL)animated {
      // Display a UIAlertController alert
      NSString *message = @"This UIAlertController will be moved to the top of the screen if it calls `presentViewController:`";
      UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"UIAlertController iOS 8.1" message:message preferredStyle:UIAlertControllerStyleAlert];
      [alert addAction:[UIAlertAction actionWithTitle:@"I think that's a Bug" style:UIAlertActionStyleCancel handler:nil]];
      [self presentViewController:alert animated:YES completion:nil];
  
      // The UIAlertController should Present and then Dismiss a view
      UIViewController *viewController = [[UIViewController alloc] init];
      viewController.view.backgroundColor = self.view.tintColor;
      [alert presentViewController:viewController animated:YES completion:^{
          dispatch_after(0, dispatch_get_main_queue(), ^{
              [viewController dismissViewControllerAnimated:YES completion:nil];
          });
      }];
  
      // RESULT:
      // UIAlertController has been moved to the top of the screen.
      // http://i.imgur.com/KtZobuK.png
  }
  </code></pre>
  
  <p>Is there anything in the above code that would be causing this issue? Do any alternatives exist that would allow bug-free presentation of a view from a UIAlertController?</p>
  
  <p>rdar://19037589<br>
  <a href="http://openradar.appspot.com/19037589" rel="noreferrer">http://openradar.appspot.com/19037589</a></p>