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 e开发者_C百科ntering 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.
Was able to do this by using [myWebView endEditing:YES]
精彩评论