如何在iPad应用程序中打开电源点文档? [英] How can one open a power point document in an iPad application?
问题描述
我有一个拆分视图控制器,其中详细视图有一个按钮,可以打开一个powerpoint演示文稿。我将如何实现它?
I have a split view controller in which the detail view has a button that is supposed to open a powerpoint presentation. How would I get about implementing that?
我听说UiWebView woud实现如下:
I have heard that a UiWebView woud implement that as follows:
- [UIWebView loadData:MIMEType:textEncodingName:baseURL:]
-[UIWebView loadData:MIMEType:textEncodingName:baseURL:]
[webView loadData:[NSData dataWithContentsOfFile:filePath] MIMEType:@application / vnd.ms-powerpointtextEncodingName :@UTF-8baseURL:[NSURL URLWithString:filePath]]
[webView loadData:[NSData dataWithContentsOfFile:filePath] MIMEType:@"application/vnd.ms-powerpoint" textEncodingName:@"UTF-8" baseURL:[NSURL URLWithString:filePath]]
但这是否意味着我必须添加一个新视图并将UiWebView放在上面?有更简单的方法吗?
However does that mean I have to add a new view and put the UiWebView on it? Is there an easier way?
谢谢
推荐答案
UIWebView是一个查看所以它必须添加到某种ViewController。我们将它添加到我们的ViewController并使self.webView.delegate = self,以便它在当前控制器中加载。
UIWebView is a view so it has to be added to some sort of ViewController. We add it to our ViewController and make the self.webView.delegate = self so that it loads in the current controller.
这篇关于如何在iPad应用程序中打开电源点文档?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!