aaisataev
aaisataev

Reputation: 1683

Delete blinking cursor in a textField

I have a pickerView in a textField.

Problem is how to hide blinking cursor after a word in the textField when I choose the row.

enter image description here

Thanks.

Upvotes: 1

Views: 429

Answers (2)

Mayank Patel
Mayank Patel

Reputation: 3908

You can do using setting the color of your textfield

Objective C:

[[self yourtextField] setTintColor:[UIColor clearColor]];

Swift:

self.yourtextField().tintColor = UIColor.clearColor()

Upvotes: 1

Bista
Bista

Reputation: 7893

Try using following code in didSelectRow:

[yourTextField resignFirstResponder]

Upvotes: 0

Related Questions