LawVS
LawVS

Reputation: 77

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?

Upvotes: 4

Views: 10971

Answers (2)

Nyx0uf
Nyx0uf

Reputation: 4649

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

Upvotes: 4

Barrie Reader
Barrie Reader

Reputation: 10713

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

:) Hope that helps!

Upvotes: 13

Related Questions