I have a UITextField
which I have set it's inputView
to be of a UIPickerView
so the user can choose between a few values there. However I'm having trouble making the textfield become first responder.
If I set my textfield userInteractionEnabled = NO
then it won't become first responder but if I set it to YES
it will become first responder but then I will have a blinking cursor in there which I do not want. So how to make a read-only UITextField
become first responder?
From your question it looks you dont need a
UITextField
. So an alternative way to achieve this is to have aUILabel
with aUIButton
added on top, which will bring the picker. On selection of any value in picker, theUILabel
text can be modified.