1

我可以像这样打开一个文档交互控制器:

UIDocumentInteractionController *documentController = [UIDocumentInteractionController interactionControllerWithURL:URL];
documentController.delegate = self;
[documentController presentPreviewAnimated:FALSE];

但是,如果我尝试像这样以编程方式关闭它:

[documentController dismissPreviewAnimated:FALSE];

应用程序在 dismissPreviewAnimated 行崩溃,并显示消息“[QLPreviewController exitFullScreenToRect:inView:]: unrecognized selector sent to instance 0x197500”。

我的目标是在应用程序接受传入文件时从应用程序委托中关闭预览(我将 documentController 变量传递给应用程序委托,以便它可以找到控制器),但即使我在当前之后立即放置关闭命令命令,我得到同样的崩溃。

错误消息中对 QLPreviewController 的引用告诉我,dismissPreviewAnimated 正在调用一个正在崩溃的底层方法。尽管我没有直接使用它,但我尝试将 QuickLook 框架添加到我的项目中,但这并没有帮助。

我在文档中没有看到任何关于此的内容,当我在网络或开发者论坛中搜索“UIDocumentInteractionControllerdismissPreviewAnimated”时,也没有找到任何示例或信息。任何人都可以对此有所了解吗?

4

1 回答 1

1

好的,Apple 确认这是 iOS 4.3 中的一个错误。

编辑:我已经确认这已在 iOS 5.0 中修复。

于 2011-08-24T19:39:36.707 回答