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

Commit 8c25436

Browse files
author
Sam Spencer
committed
Allow Gesture Recognizer To Function Simultaneously With Other GRs
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.
1 parent 9311f8d commit 8c25436

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Classes/BEMSimpleLineGraphView.m

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1301,6 +1301,14 @@ - (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer {
13011301
} else return NO;
13021302
}
13031303

1304+
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer{
1305+
return YES;
1306+
}
1307+
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch{
1308+
return YES;
1309+
}
1310+
1311+
13041312
- (void)handleGestureAction:(UIGestureRecognizer *)recognizer {
13051313
CGPoint translation = [recognizer locationInView:self.viewForBaselineLayout];
13061314

0 commit comments

Comments
 (0)