ios - Hide keyboard when UIMenuViewController is shown -


when show uimenuviewcontroller on uitextfiled, keyboard pops up.

wondering if there way hide keyboard when uimenuviewcontroller visible.

i use below code show menu.

    nsarray *buttons = items;     nsmutablearray *menuitems = [nsmutablearray array];     (nsstring *buttontext in buttons) {         nsstring *sel = [nsstring stringwithformat:@"magic_%@", buttontext];         [menuitems addobject:[[uimenuitem alloc]                               initwithtitle:buttontext                               action:nsselectorfromstring(sel)]];     }     uimenucontroller *menucont = [uimenucontroller sharedmenucontroller];     [menucont settargetrect:view.frame inview:view.superview];     menucont.arrowdirection = uimenucontrollerarrowdown;     menucont.menuitems = menuitems;     [menucont setmenuvisible:yes animated:yes]; 

when want hide keyboard (in example menu items visible) hiding keyboard use [textfield resignfirstresponder];

may problem solve


Comments

Popular posts from this blog

javascript - Complete OpenIDConnect auth when requesting via Ajax -

c# - Replace text in MailItem Body -

java - Get more than One value and display it -