Closed sage-IT closed 7 years ago
Yes, that's the way to go: add your touch gesture handler (swipe action), and bind to existing command via the Javascript "bridge".
You will probably have to handle touch conflicts with interactive items in EPUB content, such as audio/video time bars, widgets, etc. Swipe control was implemented using Hammer.js in the cloud reader and the Chrome app, but subsequently removed as the user experience wasn't fully satisfactory. Native apps have to deal with UX issues on a per-platform basis. Unfortunately there is no adequate cross-platform solution.
Yay I did it!!! It seems to be working 90% of the time but in 1/10 tests i somehow downloaded one of the readium java script pages and opend safari :/.. I cant emulate this problem though. Let me know if you would like me to create a branch. I only modified one file and added a -(void) viewDidLoad
function to that file with the swipe gesture functions as well. Its seems to handle bounds checking fine too.
feel free to create a pull request against the development branch.
Hey guys,
Since this isnt officially supported yet i thought I'd ask if there is a branch for the ReadiumSDK launcher for IOS that implements swipe navigation. Ive been looking through the code and I cant seem to find where the navigation is controlled. I know there is a UINavigation controller in there somewhere I think if I find where that code is located I can get started on implementing swipe navigation.
Cheers
Update: EpubViewController.m has the controls for the navigation. The functions invoke a javascript that utilises: @"ReadiumSDK.reader.openPageNext()" and @"ReadiumSDK.reader.openPagePrev()". Im gonna first try and add a swift controller for the swipe navigation.