I have a pick list to select a day and a text field to show the selected date. It will be like this...
If i choose any date, it will be like this....
The cross symbol in text field is acheived by the code....
textField.clearButtonMode=UITextFieldViewModeAlways;
Now my problem is, while clicking on this cross button, a keyboard was displayed. This is like....
But i want the cross button only for erase the text field. The keyboard should not come. Is it possible?
On your UITextFieldDelegate, implement the method - (BOOL)textFieldShouldBeginEditing:(UITextField *)textField
and return NO
;
- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField {
return NO;
}