I have a UITextField, which is a UIScrollView view. I have a single click gesture (or possibly an older contact) as part of a UITextField that makes it the first responder. I wanted to add a double gesture gesture to UITextField. To make the two Gesture mutually exclusive, I had to overload (although this is not quite the right word, because I do not use the same name) a single press of Gesture. When I do this, it works great until the function that it calls makes UITextField the first responder. If this makes the text field the first responder, it does not work the second time it called .... wtf. So the stack, a little help will go a long way.
that's where i add the gesture
UITapGestureRecognizer * singleTextTap = [[UITapGestureRecognizer alloc]
initWithTarget:self action:@selector(handleSingleTextTap:)];
singleTextTap.numberOfTapsRequired = 1;
[aTextField addGestureRecognizer:singleTextTap];
and here it is called
- (void) handleSingleTextTap:(UITapGestureRecognizer *)gestureRecognizer{
NSLog(@"handling single tap");
NSLog(@"textField gestures %@",
[gestureRecognizer.view.gestureRecognizers descriptionWithLocale:nil]);
[(UITextField *)gestureRecognizer.view becomeFirstResponder];
}
, NSLog, , textField, singleTextTap. "" , .