Crashlytics send me this error in my app:

```
Fatal Exception: NSInternalInconsistencyException
Trying to dismiss UIAlertController <UIAlertController: 0x14de40020> with unknown presenter.

UIKit   
-[UIAlertController _dismissAnimated:triggeringAction:triggeredByPopoverDimmingView:] + 584

```

This problem only occurs in iOS 8 but when I try to reproduce this error, my `alertViews` work correctly in iOS 8 and nothing bad happens. Why this problem is happening? 

I have read that in iOS 8 `UIAlertView` is deprecated and now, we have to use `UIAlertController` but when I try to use UIAlertController I can't dismiss the alert and the functionality is not the same.

Please help me.

Thank you for advance.

**EDIT:**

The code I want to change is this:

```
UIAlertView * alerta = [[UIAlertView alloc] initWithTitle: AMLocalizedString(@"alertUpdate", @"")
                                                  message:@"\n"
                                                 delegate:self
                                        cancelButtonTitle:nil
                                        otherButtonTitles:nil];

UIActivityIndicatorView *spinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
spinner.center = CGPointMake(139.5, 75.5); // .5 so it doesn't blur
[alerta addSubview:spinner];
[spinner startAnimating];
[alerta show];

UIStoryboard *storyBoard = [UIStoryboard storyboardWithName:dis bundle:nil];
MainVC *main = [storyBoard instantiateViewControllerWithIdentifier:@"MainVC"];
UINavigationController *navControl = [[UINavigationController alloc] initWithRootViewController: main];
[self presentModalViewController: navControl animated: YES];

[alerta dismissWithClickedButtonIndex:0 animated:YES];

```