Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IOS: UItextfield disabled

When we push on a textfield, a cursor appears in this textfield, but I don't want that this cursor appear. I want to make this textfield disabled, where you can't write inside.

How can I do this?

like image 410
cyclingIsBetter Avatar asked May 10 '11 09:05

cyclingIsBetter


1 Answers

Can you set enabled property/userInteractionEnabled of text field to No in ViewDidLoad() using the code

textField.enabled = NO;

or

textField.userInteractionEnabled = NO;
like image 99
PgmFreek Avatar answered Sep 20 '22 20:09

PgmFreek