【问题标题】:UIDocumentInteractionController crashes caught by Exception Breakpoint异常断点捕获的 UIDocumentInteractionController 崩溃
【发布时间】:2012-10-17 17:53:55
【问题描述】:

我正在使用 UIDocumentInteractionController 来预览 pdf 文件。我显示控制器如下:

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

这一切都是一种享受。但是,如果我向 Xcode 添加一个 Exception Breakpoint catch-all 并调试应用程序,那么我会注意到在我与 pdf 文档交互时发生了很多崩溃。应用程序并没有完全崩溃,但只要我点击文档就会触发异常断点。

我需要担心这种行为吗?

【问题讨论】:

    标签: objective-c ios exception breakpoints uidocumentinteraction


    【解决方案1】:

    如果您没有保留 UIDocumentInteractionController 对象,那么您将看到崩溃。尽量保留 self.docInteractionController。我也遇到了同样的问题,这解决了它。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-12-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-09-05
      相关资源
      最近更新 更多