jfisk
jfisk

Reputation: 6215

implementing a delegate

Im trying to follow this article for having simultaneous pan and pinch gesture recognizers but im unsure when I would call this method:

  #pragma mark - UIGestureRecognizerDelegate

- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer

Currently I have a pan and pinch gesture recognizer so i can use the methods he is explaining. I add the boolean method as well, but where exactly would I call it?

the article: [1]: http://www.mindtreatstudios.com/our-projects/ios-gesture-recognizer-tips-tricks/

Upvotes: 0

Views: 98

Answers (2)

Ryan Crews
Ryan Crews

Reputation: 3033

Gary is correct, for it to be called you would need your two recognizers to have the proper delegate set (likely self).

Upvotes: 0

Gary
Gary

Reputation: 5732

You don't call it, the gesture recogniser will call that method to tell you something of interest has occurred.

Upvotes: 1

Related Questions