2

Can some one tell me whether any control or framework is there that will show epub files as an iphone app?

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]]];
Satyam
  • 15,493
  • 31
  • 131
  • 244

1 Answers1

2

ePub files basically use HTML files (among others) to compile what you would see in iBooks. You can unzip the ePub file and display the HTML files in a UIWebView, or any other way you decide to go about it.

WrightsCS
  • 50,551
  • 22
  • 134
  • 186
  • thank you very much. i never came across any file which is in epub format. i'll study more on it. – Satyam Jan 25 '11 at 05:43
  • I'm afraid that webview is not showing epub files.... i updated my description with the code that i'm using... have a look at it. – Satyam Jan 25 '11 at 13:15
  • You need to unzip it. An epub is actually a zip file containing multiple HTML files and images. – Amy Worrall Jan 25 '11 at 16:47
  • There's a mini-walkthrough here: http://stackoverflow.com/questions/1388467/reading-epub-format/2034410#2034410 – Euan Jan 28 '11 at 01:13