1 UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"确认" message:@"确认删除吗?" preferredStyle:UIAlertControllerStyleAlert];
 2     
 3     UIAlertAction *action1 = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleDestructive handler:^(UIAlertAction * _Nonnull action) {
 4         //取消处理
 5     }];
 6     
 7     UIAlertAction *action2 = [UIAlertAction actionWithTitle:@"确认" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
 8         //确认处理
 9     }];
10     
11     [alert addAction:action1];
12     [alert addAction:action2];
13     [self.navigationController presentViewController:alert animated:YES completion:nil];

 

相关文章:

  • 2021-07-18
  • 2021-12-15
  • 2021-11-04
  • 2022-12-23
  • 2021-12-27
  • 2021-04-12
猜你喜欢
  • 2021-04-09
  • 2022-02-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-13
  • 2021-10-08
相关资源
相似解决方案