我正在使用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];