0
我想在UIWebview中加載一個本地文件example.pages。我試過這個如何在UIWebview中加載.pages(iWork)?
NSString *path = [[NSBundle mainBundle] pathForResource:@"example" ofType:@"pages" inDirectory:@""];
NSUrl *url = [NSURL fileURLWithPath:path];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[webview loadRequest:request];
但不起作用。 有人嗎?
那麼如何載入.pages文件? – acid 2012-03-18 21:31:26
我帶回去;這可能是可能的。參見[這個相關的問題](http://stackoverflow.com/questions/2543295/is-there-any-apis-to-displayed-the-iwork-files-in-iphone)和[QA 1630](http:///developer.apple.com/library/ios/#qa/qa1630/_index.html)。 – 2012-03-18 21:35:48
我嘗試將文檔作爲zip文件加載,example.pages.zip 但仍不起作用。 (Keynote,Numbers和Pages文檔必須使用iWork '06或iWork '08創建,iWork '06和iWork '08文檔是文檔包,必須經過ZIP壓縮以便UIWebView識別它們,您必須在文件中保留兩個擴展名名稱,例如presentation.key.zip,spreadsheet.numbers.zip或paper.pages.zip。) – acid 2012-03-18 22:33:16