What is the best way to search for a string of text in a UIWebView
?
I think that the best to proceed is to:
stringByEvaluatingJavaScriptFromString:
(see here) method to get the javascript codeCall the same method to look for the javascript
function (put this code in a function that will take the aString
argument):
NSString *findThisStringFnc = [NSString stringWithFormat:@"findThisString('%@')",aString];
[self stringByEvaluatingJavaScriptFromString:findThisStringFnc ];
Put all this code in a function (findAString
for example) then call it from the UIWebView
instance:
[aWebView findAString:@"foobar"];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With