Disable blinking cursor in UITextField?

Tobias Frischholz picture Tobias Frischholz · Aug 19, 2011 · Viewed 24.5k times · Source

I've followed the instructions here and succesfully set up a UITextField that gets updated with a UIDatePicker. However the cursor in the UITextField is blinking, which seems quite a bit awkward to me. Is there any solution to get rid of that cursor?

Answer

Jamie Chapman picture Jamie Chapman · Feb 18, 2014

I realise this is an old question, but with the updates to iOS 7, it is now possible to hide the cursor by doing the following:

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

It will only work on iOS 7+ however.