解决方案 »

  1.   


    documentController = [UIDocumentInteractionController interactionControllerWithURL:[NSURL fileURLWithPath:filePath]];
    documentController.delegate = self;
    documentController.UTI = @"com.microsoft.word.doc";
    [documentController presentOpenInMenuFromRect:CGRectMake(760, 20, 100, 100) inView:self.view animated:YES];
    其中filePath为你要打开的文件路径,
    UTI可以去
    https://developer.apple.com/library/mac/#documentation/Miscellaneous/Reference/UTIRef/Articles/System-DeclaredUniformTypeIdentifiers.html
    根据filePath文件后缀名去动态设置
      

  2.   

    顺便说一下还可以用[[UIApplicationsharedApplication] openURL:[NSURLURLWithString:@"taobao://"]]这种方式直接调用app。不过一般存在于自家app互调或者想要调用的app有开放接口的情况下,且并不针对文件。