3

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?

4

1 に答える 1

0

あなたの質問から、UITextField. したがって、これを実現する別の方法は、上にUILabelUIButton追加することです。これにより、ピッカーが表示されます。ピッカーで任意の値を選択すると、UILabelテキストを変更できます。

于 2012-10-09T08:02:17.607 に答える