Find a word in UIwebview

I have a webview and text box. The size of the web view is small (therefore, all content is not displayed at the same time). I want to find one word. My requirement is that suppose I enter a word in a text box, and then there are 10 occurrences of that word. When I press the button, the focus should move in places one after another (at the touch of a button). if the appearance is finally there, then this word should be visible when an occasion occurs (the webview needs to be changed. bcoz default webview will display the last paragraph). Pl. help with this.

+4
source share
1 answer

Probably the easiest one is achieved using javascript, look at this UIWebView stringByEvaluatingJavaScriptFromString method :

Using this, you can call javascript functions inside a web view. You can even introduce new functions to the page using the method - and then call them.

0
source

Source: https://habr.com/ru/post/1304767/


All Articles