Skip to content
This repository has been archived by the owner on Dec 2, 2020. It is now read-only.

Commit

Permalink
Allow Gesture Recognizer To Function Simultaneously With Other GRs
Browse files Browse the repository at this point in the history
This modification ensures that apps depending upon this library which
have other gesture recognizers in use during the display of
BEMSimpleLineGraphView will be able to utilize delegate methods
-lineGraph:didTouchGraphWithClosestIndex: and
-lineGraph:didReleaseTouchFromGraphWithClosestIndex:

Without responding to the UIGestureRecognizer delegate method changes
contained in this commit, the BEMSimpleLineGraphView delegate methods
are never called.
  • Loading branch information
Sam Spencer committed Jul 31, 2015
1 parent 9311f8d commit 8c25436
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Classes/BEMSimpleLineGraphView.m
Original file line number Diff line number Diff line change
Expand Up @@ -1301,6 +1301,14 @@ - (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer {
} else return NO;
}

- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer{
return YES;
}
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch{
return YES;
}


- (void)handleGestureAction:(UIGestureRecognizer *)recognizer {
CGPoint translation = [recognizer locationInView:self.viewForBaselineLayout];

Expand Down

0 comments on commit 8c25436

Please sign in to comment.