1. Create a cancel button in UITextField.
By default, the cancel button is disable when a new UITextField control is added to view. The button can be enabled by changing the option for Clear Button of the UITextField property.
2. Disable the clearing old text in UITextField editing.
By default, when text is input to the UITextField, any previous entered text will be cleared. This can be disabled by unchecking the clear when editing begins option.