开发者

How do I disable a textfield?

开发者 https://www.devze.com 2022-12-22 17:08 出处:网络
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 abo开发者_如何学Pythonut that in text?I believe

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 abo开发者_如何学Pythonut that in text?


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

:) Hope that helps!


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号