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無法打開文件?
和我的代碼不起作用。