I wanted to add a drop down box to get the user to select from some pre-defined values in my iPhone app but as that’s not possible I thought I would use a picker instead. How do I get the textview to prompt a picker value to populate the Textview with the selection?
Share
You could set a
UIPickerViewas theinputViewto theUITextViewand listen for changes to the picker and adjust the content of theUITextViewaccordingly. You will probably still see a cursor though.The inputView essentially replaces the keyBoard. External keyboard can however still enter normal text into the
UITextViewunless you prevent this via the delegate method