Skip to content
This repository was archived by the owner on May 7, 2025. It is now read-only.

Conversation

@nodehack
Copy link

This is part of a pull request for issue: #48

Refactor to use WKWebView

This pull request demonstrates a possible refactor to use Apple's new WKWebView instead of a UIWebView. It involves serving readium from the internal http server as part of a change to the readium-sdk project found in a separate pull request (sorry I don't know how to link the two).

Known issues:
  • The webview frame is not accurate which causes some content to render below the bottom tool bar and some page numbers to be miscalculated. I do not see this issue in my own project so it is probably just a layout issue involving the navigation bar/toolbar.
  • There could be an issue where readium's reader.html loads instead of the intended epub spine item if the epub spine item is named reader.html. Basically that spine item would not function and the book would not render correctly from then on.
  • I have not extensively tested this solution to make sure it works with all features. Bookmarks and page turning work however it is unknown if multimedia overlays function correctly.
Videos

Feel free to checkout the code and play with it: git clone --recursive https://github.com/nodehack/SDKLauncher-iOS.git

Added paths to a couple files in reader.html to make it easier to parse them out for serving from internal http server.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, those pesky hard-coded submodule references! :)
(we must remember to replace these if/when we merge this to Readium's develop branch)

@danielweck
Copy link
Member

@danielweck danielweck closed this Apr 8, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants