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