UItextfield auto labelling
i'm having one text field, normally when touch the text field, keyboard will appear, is it开发者_开发百科 any possibilities where when text field is touch one drop down list will appear to recommend value to be enter and value is selected it will appear in texr field
thanks
There's no automatic way of doing it but it is possible.
You would use the textFieldDidBeginEditing:
delegate method of the UITextField
to display a UIPickerView
to your view. (You could also use textFieldShouldBeginEditing:
depending on what you wanted to do.) When a user selected an item in the picker, you would add code to copy the appropriate text to the text field and, presumably, hide or delete the picker. You'd also need to hide or delete the picker when the text field lost focus.
精彩评论