title: UIAlertController executes handler immediately
body: <p>I have problem with <a href="/questions/tagged/uialertcontroller" class="post-tag" title="show questions tagged &#39;uialertcontroller&#39;" rel="tag">uialertcontroller</a>. <a href="/questions/tagged/uialertview" class="post-tag" title="show questions tagged &#39;uialertview&#39;" rel="tag">uialertview</a> works perfectly but this just won't. I have this:</p>
  
  <pre><code>UIAlertController *alertController = [UIAlertController alertControllerWithTitle:LocalizedString(@"Success")
                                                                                       message:LocalizedString(@"Example") preferredStyle:UIAlertControllerStyleAlert];
  UIAlertAction *actionOk = [UIAlertAction actionWithTitle:LocalizedString(@"Ok")
                                                                 style:UIAlertActionStyleDefault
                                                              handler:^(UIAlertAction *action){
                                                                  [self dismissViewControllerAnimated:YES completion:^
                                                                   {
                                                                       [self performSelector:@selector(presentLogInViewController) withObject:nil];
                                                                   }];
                                                              }];
  [alertController addAction:actionOk];
  [self presentViewController:alertController animated:YES completion:nil];
  </code></pre>
  
  <p>Message is shown for two seconds and executes handler immediatly. I want to handle when button Ok is pressed but it does not work. What am I doing wrong?</p>