Теперь я использую pspdfkit для ios, и теперь я могу аннотировать pdf-файл из локального каталога. Проблема в том, что аннотация сохраняется автоматически. Я открыл PDF так. Как сохранить PDF-файл только при нажатии кнопки «Сохранить»? Я могу сделать пользовательскую кнопку сохранения, например, следующие коды.pspdfkit Custom Save iOS
PSPDFDocument *document = [PSPDFDocument documentWithURL:documentURL];
PSPDFViewController *pdfController = [[PSPDFViewController alloc] initWithDocument:document];
pdfController.openInButtonItem.openOptions = PSPDFOpenInOptionsOriginal;
UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle:@"Back" style:UIBarButtonItemStyleBordered target:self action:@selector(backFromDocument)] ;
pdfController.leftBarButtonItems = @[backButton];
pdfController.rightBarButtonItems = @[pdfController.annotationButtonItem, pdfController.searchButtonItem, pdfController.outlineButtonItem, pdfController.viewModeButtonItem];
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:pdfController];
[self presentViewController:navController animated:YES completion:NULL];