2

有人可以告诉我是否有任何控件或框架可以将 epub 文件显示为 iphone 应用程序?

NSString* filePath = [[NSBundle mainBundle] pathForResource:@"LittleBoPeep-ANurseryRhymePictureBook" ofType:@"epub"];
UIWebView* wv = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
[self.view addSubview:wv];
[wv loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:filePath]]];
4

1 回答 1

2

ePub 文件基本上使用 HTML 文件(以及其他文件)来编译您在 iBooks 中看到的内容。您可以解压缩 ePub 文件并在 UIWebView 中显示 HTML 文件,或者您决定采用的任何其他方式。

于 2011-01-24T18:09:37.353 回答