开发者

How can one open a power point document in an iPad application?

开发者 https://www.devze.com 2023-02-14 15:35 出处:网络
I have a split view controller in which the detail view has a button that is supposed to open a powerpoint presentation. How wo开发者_如何学Gould I get about implementing that?

I have a split view controller in which the detail view has a button that is supposed to open a powerpoint presentation. How wo开发者_如何学Gould I get about implementing that?

I have heard that a UiWebView woud implement that as follows:

-[UIWebView loadData:MIMEType:textEncodingName:baseURL:]

[webView loadData:[NSData dataWithContentsOfFile:filePath] MIMEType:@"application/vnd.ms-powerpoint" textEncodingName:@"UTF-8" baseURL:[NSURL URLWithString:filePath]]

However does that mean I have to add a new view and put the UiWebView on it? Is there an easier way?

Thanks


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.

0

精彩评论

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

关注公众号