- (void)textFieldDidBeginEditing:(UITextField *)textField {
[textField selectAll:self];
}
- (BOOL)textFieldShouldReturn:(UITextField *)textField {
[textField resignFirstResponder];
return YES;
}
In the above, the textField selects correctly but when I return from the keyboard and tap the textField for a second time consecutively, it does not select the text. If I do not pick it consecutively or if I deselect the text before returning from the keyboard, the next focus of that textField selects the text correctly.
How can I select the text in the abovementioned case?