且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

UIWebView 不打开 ms word (doc) 和 ms excel (xls) 文件

更新时间:2023-09-20 19:04:40

为了加载word或excel或pdf文档,你需要的是文档文件物理路径.这意味着文件应该保存在文档或临时目录中,或者它可能在应用程序包中.

For loading word or excel or pdf documents, you need is physical path of document file. it means file should saved in document or temporary directory or it may be in application bundle.

//now use file path to load in webview
[yourWebView loadRequest:[NSURLRequest requestWithURL:[NSURL  fileURLWithPath:yourFilePath]]];