uidocumentInteractionController崩溃被异常断点所捕获



我正在使用uidocumentInteractionController预览PDF文件。我显示控制器如下:

self.docInteractionController = [UIDocumentInteractionController interactionControllerWithURL:pdfUrl];
    self.docInteractionController.delegate = self;
    self.docInteractionController.name = literature.title;
    [self.docInteractionController presentPreviewAnimated:YES];  

这一切都有用。但是,如果我添加一个异常断点到XCode并调试应用程序,则在与PDF文档进行交互时,我会注意到发生了很多崩溃。该应用程序不会完全崩溃,但是每当我点击文档时,例外断点就会触发。

我需要担心这种行为吗?

如果您没有保留uidocumentInteractionController对象,则在看到崩溃时。尝试保留self.docinteractionController。我也遇到了相同的问题,并将其解决了。

最新更新