Iphone – Highlite Select Text in UIWebview

iphoneuiwebview

i want to Select text using gesture and highlite that text.i had done display html page in UIwebview but uiwebview does not fire touch begin event, So how can i do.

1) when user select text (i.e user select text "i Know uesr" that part of text color should be change.

if you have any idea below of the query,kindly suggest me..

Thank you

Milan

Best Answer

If you look at the docs for a UIWebView, you know your options are limited. You're going to have do it with javascript. Your only weapon is - (NSString *)stringByEvaluatingJavaScriptFromString:(NSString *)script and your ability to load every page as a string (which you can manipulate) before passing it to you UIWebView as a page (using - (void)loadHTMLString:(NSString *)string baseURL:(NSURL *)baseURL).

So... good luck with that. ;)

Related Topic