I want to implement an ePub reader for the iOS platform. Please suggest any open source code for book flipping animation, bookmarks, font-size customization and single page view (without scroll bars).
Opening the ePUB in the iBooks app On your iPad, open the email you have been sent with the files. Hold down the icon for the ePUB file attachment. A menu should open which says Open In. Select iBooks.
The Neat Reader iOS version is an ePub reader developed specifically for iOS and currently supports iOS 9.0 and above. As long as your iOS device system version is 9.0 or higher, you can use Neat Reader to read ePub files.
As the previous article points out, there is no API that given an ePub will just display it -- you need to do some work:
If you want to ensure that the documents don't hit the network you'll need to implement a custom NSURLProtocol and serve the bytes for the files yourself as file:/// allows cross domain access.
That will display the content just fine, but the "hard" part is moving between the documents (which usually represent a whole chapter). This is the work that iBooks and other apps do for you.
NOTE: For the UIWebView to display the content correctly, you have to ensure that the file has a .xhtml extension when using file:/// urls. If you implement your own URL protocol handler, you need to make sure the protocol handler returns the correct xml content type for xhtml, namely:
application/xhtml+xml
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With