2017-04-06 4 views
0
UIDocumentInteractionController *documentVc = [UIDocumentInteractionController interactionControllerWithURL:fileURL]; 

documentVc.delegate = self; 

if (![documentVc respondsToSelector:@selector(presentPreviewAnimated:)]) { 
    NSLog(@"can not open this file"); 
} else { 
    [documentVc presentPreviewAnimated:YES]; 
} 

UIDocumentInteractionControllerがファイルを開くことができない場合、そのファイルを開くことはできません。何か案が?UIDocumentInteractionControllerがファイルを開くことができないことを知るにはどうすればよいですか?

と私のコードが動作していません。

答えて

0

[documentVc presentPreviewAnimated:YES]

この方法は、ファイルを表示することができたかどうかを示す戻り値を有しています。

関連する問題