Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I disable a textfield?

I have a textfield which displays a result but I don't want it to be accessible by the user as in I don't want the keyboard to come up. How would I go about that in text?

like image 507
LawVS Avatar asked Dec 03 '22 13:12

LawVS


2 Answers

I believe you are looking for: UITextField.enabled = NO; or UITextField.hidden = YES;

:) Hope that helps!

like image 88
Barrie Reader Avatar answered Dec 16 '22 22:12

Barrie Reader


UITextField.enabled rather than UITextField.Hidden, otherwise you will no longer see your textfield.

like image 44
Nyx0uf Avatar answered Dec 16 '22 22:12

Nyx0uf