I have an UIWebView
with an <input type="text"/>
html element in it.
I want to focus the input element in the html and show the keyboard on the iPhone programmatically, without tapping the screen.
I've tried the following:
- set the focus from JavaScript (in this case the onFocus JS event will fire but the keyboard won't show up)
[webView becomeFirstresponder]
(returns NO)- set the first subview of the webView to be the
firstResponder
(returns NO) - subclass
UIWebView
to return YES tocanBecomeFirstResponder
: (nothing happens)
I'm trying to find the solution since yesterday but I couldn't find it. Please help.