mrugen munshi
mrugen munshi

Reputation: 3593

get cursor on textfield

I need to get the cursor in textfiled but on the textfileddidbeginEditing i have to open the picker view for selection , so for that reason i need to resignFirtsresponder to the textfield ,inorder that picker view is visible .But by doing this the cursor gets disabled as i open the picker (and the keyboard gets hide by resignFirst responder).I want to show the cursor as because when user cliks on partilcuar textfield so by that cursor he can track on which textfield he is making the selection.

Hope i am clear with my question.

Upvotes: 1

Views: 518

Answers (2)

Swapnil Luktuke
Swapnil Luktuke

Reputation: 10475

if you want the picker instead of keyboard, set the text fields inputView as the picker... so when you tap the text field the picker will pop up like keyboard and the textfield will show the cursor too.. no need to dismiss the keyboard and then show the picker..

Upvotes: 2

Artur Friesen
Artur Friesen

Reputation: 165

If I understand your problem right, this is just an usability problem. I think you can solve this if you just add some other mechanism for showing the user which textfield is in editing-mode.

For example add an text-color to the TextField. If the user disable the UIPickerView set the text-color back to the normal state.

Upvotes: 0

Related Questions