I think it's best to continue:
- Create a javascript function that will find your text.
- Use
stringByEvaluatingJavaScriptFromString: (see here) to get javascript code Call the same method to search for the javascript function (put this code in a function that takes aString argument):
NSString * findThisStringFnc = [NSString stringWithFormat: @ "findThisString ('% @')", aString]; [self stringByEvaluatingJavaScriptFromString: findThisStringFnc];
Put all this code in a function (e.g. findAString ), then call it from an UIWebView instance:
[aWebView findAString: @ "foobar"];
source share