Text Highlighting And Add Notes Function In Epub Reader Ios
Solution 1:
I have implemented all these for native epub player of androd and iOS- its a product R&D for an organisation
Instead of using getSelection follow the below steps.Its tedious but functionality would be fully under your control
-> Give url to UIWebView (iOS) or WebView (android)
-> in call back of webview didload - wrap all text words into spans with unique ids
-> propagate touch events to webview- javascript will handle those touches using function onTouchMove(e)
-> get touched span using document.elementFromPoint
-> highlight those spans (words)
-> You will get position of each span $('#wordID-'+sWordID).position()
,you can pass those values from javascript to native code
-> Add sticky notes view to the super view of webview
Note: better inject jQuery in run time into webview for wrapping words into spans
Post a Comment for "Text Highlighting And Add Notes Function In Epub Reader Ios"