开发者

How can I open a *.doc, *.xls file in an iPhone App?

How a document, Excel, presentation file can be opened in a iPhone app. Using a Web view we can open the *.pdf file using the following lines of code:

    NSString *thePath = [[NSBundle mainBundle] pathForResource:@"iPhone_User_Guide" ofType:@"pdf"];

    if(thePath) {

    NSData *pdfData = [NSData dataWithContentsOfFile:thePath];

    [webview loadData:pdfData MIMEType:@"application/pdf"

     开发者_开发百科   textEncodingName:@"utf-8" baseURL:nil];

     }

How can we open doc, ppt, xls files in a webview this way?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜