iOS在app中打开word、execl、pdf等文档

//UIWebView

-(void)open:(NSString*)wordName andView:(UIWebView*)webView

{

    NSString *path = [[NSBundle mainBundle] pathForResource:wordName ofType:nil];

    NSURL *url = [NSURL fileURLWithPath:path];

    NSURLRequest *request = [NSURLRequest requestWithURL:url];

    [webView loadRequest:request];

}


[self open:@"test.doc" andView:self.myweabl];


你可能感兴趣的:(iOS在app中打开pdf,iOS在app中打开execl,iOS在app中打开word)