// // BatesDeleteViewController.m // PDFViewer // // Created by kdanmobile_2 on 2022/11/17. // #import "CPDFBatesDeleteViewController.h" @interface CPDFBatesDeleteViewController () @end @implementation CPDFBatesDeleteViewController - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"Delete Bates" message:@"Are you sure delete all Bates" preferredStyle:UIAlertControllerStyleAlert]; UIAlertAction *okAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) { NSDictionary *dict = [[NSDictionary alloc] initWithObjectsAndKeys:@"1",@"deleteBates", nil]; NSNotification *notification = [NSNotification notificationWithName:@"deleteBatesModel" object:nil userInfo:dict]; [[NSNotificationCenter defaultCenter] postNotification:notification]; }]; UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) { NSLog(@"Cancel Action"); }]; [alertController addAction:okAction]; [alertController addAction:cancelAction]; [self presentViewController:alertController animated:YES completion:nil]; } @end