Skip to content

Drop down table doesn't play well with gesture recognizers. #1

@Cananito

Description

@Cananito

If the superview of the textfield has a gesture recognizer, interactions with the tableview will be interrupted by the gesture recognizer.

Current workaround:

  1. Set yourself as the gesture recognizer's delegate.
  2. Implement gestureRecognizer:shouldReceiveTouch:.
  3. Add this pseudo implementation:
if ([self.dropDownTextField isFirstResponder]) {
    CGPoint touchPoint = [touch locationInView:self.dropDownTextField];

    if (CGRectContainsPoint(self.dropDownTextField.dropDownTableView.frame, touchPoint)) {
        return NO;
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions