当我们点击AlertView控制器iOS8(iPad)的外侧时,关闭AlertViewController

当我们点击AlertView控制器iOS8(iPad)的外侧时,关闭AlertViewController,ipad,ios8,uialertcontroller,Ipad,Ios8,Uialertcontroller,我正在将UIAlertControllerStyleAlert与UIAlertController一起使用。工作正常。但当我触摸/轻触控制器的一侧时,我无法消除它。请帮我做这个。我正在使用以下代码: UIAlertAction *actionDelete = nil; UIAlertController *alertController = [UIAlertController

我正在将UIAlertControllerStyleAlert与UIAlertController一起使用。工作正常。但当我触摸/轻触控制器的一侧时,我无法消除它。请帮我做这个。我正在使用以下代码:

            UIAlertAction *actionDelete = nil;
            UIAlertController *alertController = [UIAlertController
                                                  alertControllerWithTitle:@"" message:@"Testing message"
                                                  preferredStyle:UIAlertControllerStyleAlert];

            actionDelete = [UIAlertAction actionWithTitle:NSLocalizedString(@"YES", nil) style:UIAlertActionStyleDestructive handler:^(UIAlertAction *action) {
               // delete action
            }];

            [alertController addAction:actionDelete];
            [self presentViewController:alertController animated:YES completion:nil];