silicosaur
silicosaur

Reputation: 65

How can I search in an UIWebView?

I need to perform search in an html page displayed in a UIWebView control. The functionality I need is something that Safari has, when you hit command/ctrl F for searching the document for some word and the program highlights the hits for you. Is there any easy solution for this problem?

Upvotes: 3

Views: 4651

Answers (2)

Scott Kohlert
Scott Kohlert

Reputation: 413

I know it's been a long time since you asked this question, but it's still a pretty common question people have so I put together a sample project in case anyone else is asking the same question. The project is a super simple app that loads an HTML file and can search and highlight any keyword. You can download the sample project here:

https://www.dropbox.com/s/jietctrvrtnec28/TheSearcher.zip?dl=0

Scott

Edit: changed link above as the old one had broken.

Upvotes: 7

Related Questions