Ipad 从UIDocumentInteractionController结束文档的委托方法

Ipad 从UIDocumentInteractionController结束文档的委托方法,ipad,Ipad,我正在使用UIDocumentInteractionController在我的iPad应用程序中显示文档。 我想在文档关闭时执行某些操作。我使用了以下委托方法:- - (void)documentInteractionControllerDidEndPreview:(UIDocumentInteractionController *)controller{ NSLog(@"End Document"); } 但它不工作。请让我知道当我们按下隐藏documentController的“完

我正在使用UIDocumentInteractionController在我的iPad应用程序中显示文档。 我想在文档关闭时执行某些操作。我使用了以下委托方法:-

- (void)documentInteractionControllerDidEndPreview:(UIDocumentInteractionController *)controller{
    NSLog(@"End Document");
}
但它不工作。请让我知道当我们按下隐藏documentController的“完成”按钮时调用了哪个委托方法


提前感谢

我通过在当前Previewanimated通话后添加一个retain通话来实现这一点。 然后在DiEndPreview方法中,我将其设置为autorelease。
请告诉我这是否有帮助,或者您是否需要更多信息,例如代码示例。

在ARC中使用Xcode 4时,您不能调用retain。为了使用ARC,只需在头文件中将docController声明为ivar,然后在代码中正常创建docController


docController=[UIDocumentInteractionController interactionControllerWithURL:[NSURL fileURLWithPath:path]]

我没有找到解决此问题的任何方法