遵守协议
<UIDocumentInteractionControllerDelegate>
属性
@property (nonatomic, strong) UIDocumentInteractionController *documentInteractionController;
实现方法
NSURL *url = [NSURL fileURLWithPath:[[HSDownloadManager alloc] filepathWithUrl:downloadUrl1
]];
_documentInteractionController = [UIDocumentInteractionController
interactionControllerWithURL:url];
[
_documentInteractionController setDelegate:self];
_documentInteractionController .UTI = @"com.microsoft.word.doc";
//[_documentInteractionController presentOpenInMenuFromRect:CGRectZero inView:self.view animated:YES];
[
_documentInteractionController presentOptionsMenuFromRect:self.view.bounds inView:self.view animated:YES];