CPDFBatesDeleteViewController.m 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. //
  2. // BatesDeleteViewController.m
  3. // PDFViewer
  4. //
  5. // Created by kdanmobile_2 on 2022/11/17.
  6. //
  7. #import "CPDFBatesDeleteViewController.h"
  8. @interface CPDFBatesDeleteViewController ()
  9. @end
  10. @implementation CPDFBatesDeleteViewController
  11. - (void)viewDidLoad {
  12. [super viewDidLoad];
  13. // Do any additional setup after loading the view.
  14. UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"Delete Bates" message:@"Are you sure delete all Bates" preferredStyle:UIAlertControllerStyleAlert];
  15. UIAlertAction *okAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
  16. NSDictionary *dict = [[NSDictionary alloc] initWithObjectsAndKeys:@"1",@"deleteBates", nil];
  17. NSNotification *notification = [NSNotification notificationWithName:@"deleteBatesModel" object:nil userInfo:dict];
  18. [[NSNotificationCenter defaultCenter] postNotification:notification];
  19. }];
  20. UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
  21. NSLog(@"Cancel Action");
  22. }];
  23. [alertController addAction:okAction];
  24. [alertController addAction:cancelAction];
  25. [self presentViewController:alertController animated:YES completion:nil];
  26. }
  27. @end