Dismissing pickers and keyboards invoked by a UIWebView
Posted
by Dev Kanchen
on Stack Overflow
See other posts from Stack Overflow
or by Dev Kanchen
Published on 2010-03-27T13:18:15Z
Indexed on
2010/03/27
13:23 UTC
Read the original article
Hit count: 337
uiwebview
|iphone-sdk
I am implementing an in-app browser using UIWebView, that shows an 'action' button up-top that - when tapped - scales the UIWebView and allows the user to perform some other actions.
If, however, at the point of tapping this 'action' button, the user were entering some text on the webview, or using a picker to select an option from a drop-down list, then the webview gets scaled without dismissing the keyboard/picker. Apart from being ugly, this also obscures my main view and controls.
So is there a way to make a UIWebView dismiss all associated input controls, such as keyboards/pickers, when asked to?
I tried using [myWebView resignFirstResponder] but that didn't work. Any ideas? Thanks.
© Stack Overflow or respective owner