Same as http://stackoverflow.com/questions/320078/adding-the-clear-button-to-an-iphone-uitextfield but that one is old. I tried
myUITextField.clearButtonMode = UITextFieldViewModeWhileEditing;
but nothing is happening. What could be preventing it?