call below code from event like clicking close button will close keyboard in ios
-(void)close:(id)sender{
[text field name resignFirstResponder];
}
-(void)close:(id)sender{
[text field name resignFirstResponder];
}
myEditText.setOnKeyListener(new OnKeyListener() {
public boolean onKey(View v, int keyCode, KeyEvent event) {
Above code in android gets compiling error because it uses View's V so
replace with below code
myEditText.setOnKeyListener(new View.OnKeyListener() { public boolean onKey(View v, int keyCode, KeyEvent event) {