views:

38

answers:

1

I want to highlight the text when i drag the finger over the text in webview.I am able to detect the gesture and the coordinates at the point touched,But i am not able to highlight the text when i drag my finger over the text.Please help me out.Any sample codes would be more helpful. thanks.

A: 

Hello

Maybe you should do it by using JS.

For example, try http://www.jqtouch.com/, detect touch and change CSS Properties :-)

It's the best way I have in mind.

Good Luck ! Vincent

Vinzius
@Vincent--> can you provide me any sample code which implemented this, it would me more helpful.Thanks.
Warrior
Sorry But I don't have the time to code it ^^ I think there are differents ways to do it. For example you could wrap each words with a <span>, <div> or anything else. Then you could set a css class when the span is touched ;)
Vinzius
When i drag my finger over webview which method will be called.Is there any delegate method called ?
Warrior
You can subview the UIWebView but the best way is really to use JS in your case. Or you can do it without WebView but it'll be more difficult (like in the dragon ditaction app).
Vinzius