Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UITextField Clear Button Does Not Show

I want to show a clear button always in a UITextField. I have tried to both set this in .xib Interface Builder: enter image description here and in code using this line: [_firstNameField setClearButtonMode:UITextFieldViewModeAlways];

Neither causes the button to show. Help please.

like image 327
carloabelli Avatar asked Aug 21 '13 23:08

carloabelli


1 Answers

When you set it to UITextFieldViewModeAlways the clear button appears as long as there is text on the UITextField.

Hope this helps!

like image 195
LuisCien Avatar answered Oct 14 '22 16:10

LuisCien