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

时间:2015-01-27 07:46:06

标签: ipad ios8 uialertcontroller

我正在使用UIAlertControllerStyleAlert和UIAlertController。它的工作正常。但是当我触摸/敲击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];

0 个答案:

没有答案