Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable and hide a UITextField

Hi I'm new in iPhone development, how do you disable a UITextField in iPhone development? If it matters, it is a View-Based Application, and the UITextField is named abc.

Thanks

like image 934
Shawn Avatar asked Aug 15 '11 22:08

Shawn


1 Answers

If you want to hide it completely:

abc.hidden = YES;

If you just want to prevent user interaction:

abc.userInteractionEnabled = NO;

Since UITextField is a subclass of UIView (and UIControl), all the UIView (and UIControl) methods (such as those I used above) are available.

like image 158
progrmr Avatar answered Sep 18 '22 09:09

progrmr