Answers for "how to add undelete texts to textfield in ios"

0

how to add undelete texts to textfield in ios

- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string
{
    if (textField.text.length == 1 && [string isEqualToString:@""]) {//When detect backspace when have one character. 
        textField.text = @"myText";
    }
    return YES;
}
Posted by: Guest on December-04-2019

Code answers related to "how to add undelete texts to textfield in ios"

Code answers related to "Objective-C"

Browse Popular Code Answers by Language