1- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string
2{
3 if (textField.text.length == 1 && [string isEqualToString:@""]) {//When detect backspace when have one character.
4 textField.text = @"myText";
5 }
6 return YES;
7}