Reputation: 4349
I want to show a clear button always in a UITextField. I have tried to both set this in .xib Interface Builder:
and in code using this line: [_firstNameField setClearButtonMode:UITextFieldViewModeAlways];
Neither causes the button to show. Help please.
Upvotes: 6
Views: 2733
Reputation: 6432
When you set it to UITextFieldViewModeAlways
the clear button appears as long as there is text on the UITextField.
Hope this helps!
Upvotes: 15