1
votes

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

1

1 Answers

1
votes

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.