UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:@"提示" message:@"确定要提交吗?" preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction * cancelAc = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
//点击取消要执行的代码
}];
UIAlertAction *comfirmAc = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
//点击确定要执行的代码
}];
[alertVC addAction:cancelAc];
[alertVC addAction:comfirmAc];
[self presentViewController:alertVC animated:YES completion:nil];
OC-弹出提示框
最新推荐文章于 2024-05-12 09:32:59 发布