title: dismissViewControllerAnimated does not work within a block
body: <p>I try to close a <code>UIViewController</code> after an <code>UIAlertController</code> has been shown.</p>
  
  <p>This is my code:</p>
  
  <pre><code>UIAlertController *alertController = [UIAlertController alertControllerWithTitle:title 
                                                                           message:msg
                                                                    preferredStyle:UIAlertControllerStyleAlert];
  UIAlertAction *okAction = [UIAlertAction actionWithTitle:@"Accept" 
                                                     style:UIAlertActionStyleDefault 
                                                   handler:^(UIAlertAction *action)
               {
                   [self dismissViewControllerAnimated:YES completion:nil];
               }];
  
  [alertController addAction:okAction];
  [self presentViewController:alertController animated:YES completion:^{}];
  </code></pre>
  
  <p>However, <code>self</code> never gets dismissed. Anyone knows how to solve this?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>if I set <code>[self dismissViewControllerAnimated:YES completion:nil];</code> outside of the block, it works. </p>