ios - Keep keyboard always on top & visible -
i have view text field, image , few buttons. want make sure keyboard displayed , on top when view displayed , want make sure doesn't go away after type in text field , submit it.
i called [txtfield becomefirstresponder]
viewdidload , keyboard appearing default tiny delay after view displayed.
also becomefirstresponder doesn't after have text field submitted.
thanks in advance help!
also becomefirstresponder doesn't after have text field submitted.
that part makes no sense. default, text field not dismiss keyboard unless you dismiss endediting:
or resignfirstresponder
. if keyboard going away, must making go away. don't , won't.
edit: , indeed, comment later reveals answer: you've hooked didendonexit
control event text field. well, causes keyboard dismissed when user presses done button! hitting in face , complaining hitting in face.
so solution, obviously, don't hook didendonexit
control event (to anything). instead, give text field delegate , use delegate messages learn user doing. none of have automatic behavior regard keyboard, keyboard won't dismissed automatically. example, learn when user typing, use textfield:shouldchangecharactersinrange:replacementstring:
. learn when user has hit done button, use textfieldshouldreturn:
. , on.
Comments
Post a Comment