I’m not looking for finished code but more of a place to start; I am a bit stuck!
I have a long text document and and a collection of keywords that appear in this document. I know the location where each keyword appears in the document. I’m looking for a way to display this keyword half way down in a non-scrollable UIWebView along with as much of its surrounding text that will fit into the UIWebView. In other words, I would like to calculate the pagination character boundaries.
You can use core text to find this kind of information, but it’s quite complex. You might just generate an HTML document with anchor tags at each keyword, and then use javascript or fragment identifiers to move the web view around.
Edit: For example, the HTML might look like:
My text blah blah <a name="keyword-super-1">super</a> more blah blahand then use javascript like JavaScript – Jump to anchor.