我正在将 PSPDFKit 升级到最新版本,但我遇到了一些已更改的方法的问题。我查看了更改日志,但运气不佳,文档还不是那么好。
我有以下代码
[pdfController.emailButtonItem setSendOptions:PSPDFDocumentSharingOptionCurrentPageOnly|PSPDFDocumentSharingOptionAllPages|PSPDFDocumentSharingOptionFlattenAnnotations|PSPDFDocumentSharingOptionEmbedAnnotations];
我想让它与最新版本一起工作。我已经看到在新版本中我必须这样做:
PSPDFDocumentSharingViewController *sharingVC = [[PSPDFDocumentSharingViewController alloc] initWithDocument:document visiblePages:nil allowedSharingOptions:PSPDFDocumentSharingOptionCurrentPageOnly|PSPDFDocumentSharingOptionAllPages|PSPDFDocumentSharingOptionFlattenAnnotations|PSPDFDocumentSharingOptionEmbedAnnotations];
但我不知道如何将其应用于我的 PSPDFViewController 对象(pdfController)。
另外我想知道如何将其移至新版本:
pdfController.emailButtonItem.mailComposeViewControllerCustomizationBlock = ^(MFMailComposeViewController *mailController) { [mailController setSubject:@"Information"]; };
我在文档中看到了这一点:
API:删除 mailComposeViewControllerCustomizationBlock。使用 pdfViewController:shouldShowController:embeddedInController:options: 委托。
但不知道如何应用它。
有什么帮助吗?
谢谢!