I would like to do something similar for an HTML d开发者_Go百科ocument or PDF. How should I go about implementing this feature?
For an html document, I'd look into doing some simple javascript/css coding.
Try FastPDFKit, you can perform search and results will be highlighted.
http://mobfarm.eu/fastpdfkit
iBook uses JavaScript to get the selected text and it uses Images to show highlighted portion.
精彩评论