Programmatically select text in UIWebView
问题 I'm asking this question after 2 days of research. I've read all the related questions and answers in stackoverflow and google (including this question, which is very similar but without an answer) and still couldn't find a solution. Hopefully someone here will be able to help. I have a UIWebView with some text loaded into it. I want to select part of the text programmatically, as if the user long-pressed on it. I've tried executing this javascript code as a response to a click: function