Posted by: bearc0025 | January 7, 2010

Detecting taps and events on UIWebView

Detecting taps and events on UIWebView – The right way

I recently have had to figure out how to interact w/ the UIWebView in ways I didn’t think possible.

I’ve figured out how to highlight text in various colors, search text, insert local images, intercept link loads, get the user-selected text, get/set the scroll position, etc. Most of it was done at least in part w/ javascript.

UPDATE: I posted details on how I did it here.

However, this wd all be much easier if, like other views, it cd be subclassed and the touches intercepted. Not so much.

Well, here’s one alternative – I haven’t tried it, but I wanted to post it here for future reference and in congratulations of the developer…

Detecting taps and events on UIWebView – The right way « The Spoken Word.


Responses

  1. Hello,

    I am interested in how you got to select/highlight text in response to the user touch in UIWebView, any chance you can share some sample code?

    Thanks!

  2. […] Text in a UIWebView As a continuation of this post I wanted to share a few things about how I solved the problem of working w/ text in a […]


Leave a comment

Categories