I'm opening a web page on UIWebview and this page has a textfield and a virtual keyboard the to enter password. But when edit the textfield iPhone virtual keyboard appears as well. I wanted to dismiss iPhone keyboard and on the same time continue editing the textfield. I have tried the following but it did not work.
[webView stringByEvaluatingJavaScriptFromString:@"document.activeElement.blur()"];
And also tried to register for Keyboard notification so I can dimiss the keyboard but did not succeed. I would appreciate any ideas about how to achieve this. Thanks in advance.
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector (keyboardDidShow:)
name: UIKeyboardDidShowNotification object:nil];
-(void) keyboardDidShow: (NSNotification *)notif
{
// I want to dismiss the keyboard
}