Strong Like Bull
Strong Like Bull

Reputation: 11317

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

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?

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

Upvotes: 1

Views: 588

Answers (1)

Matt Hudson
Matt Hudson

Reputation: 7348

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.

Upvotes: 1

Related Questions