iphone - UITextField - Switch Between Keyboard and UIPickerView -
i'm working on iphone app uses core data. 1 of view controllers allows user edit information coffee, , has uitextfield in user can enter 1 descriptive "tag" type of coffee.
i'd set uitextfield show keyboard if user clicks main area of uitextfield (to enter new tag), , use button rightview display uipickerview allow user select list of known tags have been entered, i.e.:
--------------------------------------------- |this area should display keyboard | button | --------------------------------------------- what i'm confused how switch , forth between firstresponder keyboard , uipickerview , again if user clicks , forth.
surely out there has done this, hints on how set (or if i'm using iphone's ui elements correctly) great! thanks!
you can keep track of active text fields , pickers using 2 references like:
uitextfield *activefield; uipickerview *activepicker; whenever text field starts editing, assign activefield point it. same thing pickers. i'll assume have reference special text field in question.
now, in events handlers text field , picker view, can control happens when text fields begins/ends editing , when picker view appears/disappears. if have other text fields, you'll need check if event fired special text field comparing our activefield.
i need remind though tagging scenario implemented differently in contacts application. it's standard way , it's easier you.
Comments
Post a Comment