geminiCoder geminiCoder - 4 months ago 15
iOS Question

UIGestureRecogniser not calling delegate method

I am subclassing a UIGestureRecogniser, but for some reason the method

- (BOOL)canBePreventedByGestureRecognizer:(UIGestureRecognizer *)preventingGestureRecognizer{


isn't being called

Any Ideas

PastBin Link

Answer

I think you are mixing two ways to implement the behavior of canBePreventedByGestureRecognizer:

  1. Use the delegate class
  2. Override the methods, as you are doing

But in your interface you define:

UIGestureRecognizer <UIGestureRecognizerDelegate>

Try to remove the protocol UIGestureRecognizerDelegate?