2012-02-15 63 views
2

我正在使用UIDocumentInteractionController的presentPreviewAnimated方法來預覽文檔。它工作正常。但我希望在預覽模式下禁用操作按鈕。我有以下兩個委託方法返回NO。但是這兩種方法根本就沒有被調用。其他委託方法工作正常。任何建議?禁用UIDocumentInteractionController的操作項目presentPreviewAnimated

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

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

回答

0

我終於切換到使用QLPreviewController類。你可以在哪裏進行子類化,並使動作按鈕消失。 (在這個SO的rbrown的回答幫助下。