I create a textField and add it to the view as follows:
UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake()]; textField.borderStyle = UITextBorderStyleRoundedRect; textField.clearButtonMode = UITextFieldViewModeAlways; [otherView addSubview:textField];
The text box is displayed as expected in the otherView , but the clear button is never displayed, no matter what value I assign to clearButton. Does anyone know what could be causing this?
source share