how to dismiss already opened keyboard when popover appears ios -


in ios project, have form contains various text fields. text fields edited keyboard , picker view placed on popover.

when go on filling text fields, without dismissing , if click on popover text field keyboard remains open.

it appears both keyboard , popover present on screen @ same time, don't want.

i able whether keyboard opened or not setting flag in keyboard notification methods , last text filed edited through text filed delegates. , have tried

  1. [self endediting:yes]; (as in table cell)

  2. [lasteditedtextfield resignfirstresponder];

even try pass keyboard dismiss notification self (without knowing whether possible or not)

  1. [[nsnotificationcenter defaultcenter] postnotificationname:uikeyboardwillhidenotification object:nil];

but nothing working.

how can dismiss keyboard (if open) whenever popover appears.

thanks in advance.

try implement textfieldshouldbeginediting: , inside check text field this. if 1 of fields should display popover, first call [self.view endediting:yes] hide keyboard, present popover , return no. way text field won't take first responder status , keyboard not appear again. , if 1 of "normal" text fields, return yes.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -