ios - How to disable keyboard but enable UITextFields when using UIDatePicker? -
this 1 kind of hard explain, ask questions need clarify question. have ipad app (xcode 4.2, ios 6, arc , storyboards).
in app, have uipopover
contains uiview
2 (2) uitextfields
in , uidatepicker
. (see image). when go scene, have unchecked userinteractionenabled
on both textfields prevent keyboard responding, works, doesn't allow other uitextfield
accessed after first one. tried [ofinishtime setinputview:otimepicker];
takes timepicker , moves outside of popover, unacceptable.
i have touchupinside
events "wired" each of textfields, neither 1 gets called when tapped due userinteractionenabled being unchecked. remedy whole thing if have enabled , set flag in action event.
how can enable both uitextfields
yet prevent keyboard showing? happy post relevant code need see.
may did not understand problem correctly , seems trying open picker on tap , display value set in uipicker. not using functionality of uitextfield. label or button might serve same purpose , save doing work of disabling keyboard.
in case if want use textfield , disable keyboard picker appearing input view , have own input view it, do
-(void)textfielddidbeginediting:(uitextfield *)textfield{ [textfield resignfirstresponder]; }
you take @ this: display datepicker on tapping on textfield
Comments
Post a Comment