UIAlertController *alertController = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"Cancel"
style:UIAlertActionStyleCancel
handler:^(UIAlertAction *action)
{
NSLog(@"Cancel Action");
}];
UIAlertAction *deleteAction = [UIAlertAction actionWithTitle:@"Delete"
style:UIAlertActionStyleDefault
handler:^(UIAlertAction *action)
{
NSLog(@"Delete Action");
}];
[alertController addAction:cancelAction];
[alertController addAction:deleteAction];
[self presentViewController:alertController animated:YES completion:nil];
UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"Cancel"
style:UIAlertActionStyleCancel
handler:^(UIAlertAction *action)
{
NSLog(@"Cancel Action");
}];
UIAlertAction *deleteAction = [UIAlertAction actionWithTitle:@"Delete"
style:UIAlertActionStyleDefault
handler:^(UIAlertAction *action)
{
NSLog(@"Delete Action");
}];
[alertController addAction:cancelAction];
[alertController addAction:deleteAction];
[self presentViewController:alertController animated:YES completion:nil];