禁用UIDocumentInteractionController的presentPreviewAnimated中的操作项

时间:2012-02-15 22:57:20

标签: ios ipad uidocumentinteraction uidocument

我正在使用UIDocumentInteractionController的presentPreviewAnimated方法来预览文档。它工作正常。但我希望在预览模式下禁用操作按钮。我有以下两种委托方法返回NO。但这两种方法根本没有被调用过。其他委托方法工作正常。有什么建议吗?

-(BOOL)documentInteractionController:(UIDocumentInteractionController *)controller canPerformAction:(SEL)action {
NSLog(@"canPerformAction");
return NO;
}

-(BOOL)documentInteractionController:(UIDocumentInteractionController *)controller performAction:(SEL)action {
NSLog(@"performAction");
return NO;
}

1 个答案:

答案 0 :(得分:1)

我终于切换到使用QLPreviewController类了。您可以在哪里继承它并使操作按钮消失。 (在SO的rbrown的答案的帮助下。