I searched stackoverflow for a similar problem and found recommended solutions that worked for others, but none of them worked for me, so I'm starting to suspect that this is something that I did not do right.
It is very simple. All I want to have is that when the user clicks on the uitext field, all the text within the uitextfield is selected. Then the user can continue the deletion, click once and add from now on or start typing to rewrite everything.
I have an action from a uitext field and here is a snippet.
- (IBAction)didBeginEditDescription:(id)sender
{
NSLog(@"Description began edit.");
[self.txtfield selectall:self];
}
I know the method is called (obviously NSLog). However, nothing happens, and the cursor remains at the last position of the text. My UITextFieldDelegate is not so sure anymore, what else should I look at?
FYI, this is done for Xcode 5.0 and is trying to develop for iOS 7.
Is there something obvious that I'm missing?
source
share