标签:
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"提示" message:@"确定要删除?" preferredStyle:UIAlertControllerStyleAlert]; [alert addAction:[UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action){NSLog(@"点击了取消按钮");}]]; [alert addAction:[UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action){NSLog(@"点击了确定按钮");}]]; [self presentViewController:alert animated:YES completion:nil];
效果图如下:
标签:
原文地址:http://www.cnblogs.com/jaxer/p/5581211.html