UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"提示" message:@"是否删除数据" preferredStyle:UIAlertControllerStyleAlert];
[self presentViewController:alertController animated:YES completion:nil];
UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
NSLog(@"cancal");
}];
UIAlertAction *okAction = [UIAlertAction actionWithTitle:@"好的" style:UIAlertActionStyleDestructive handler:^(UIAlertAction * _Nonnull action) {
NSLog(@"sure");
}];
[alertController addAction:cancelAction];
[alertController addAction:okAction];
ios UIAlertController
最新推荐文章于 2022-05-24 17:17:38 发布